[wp-trac] [WordPress Trac] #35658: Provide additional data for registered meta through register_meta()
WordPress Trac
noreply at wordpress.org
Wed Jul 13 19:34:35 UTC 2016
#35658: Provide additional data for registered meta through register_meta()
-------------------------------------------------+-------------------------
Reporter: jeremyfelt | Owner: helen
Type: task (blessed) | Status: accepted
Priority: high | Milestone: 4.6
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-testing has- | Focuses:
patch rest-api needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by jeremyfelt):
Replying to [comment:114 jtsternberg]:
> Retrofitting the existing type parameter w/ optional colon-separated-
sub-type makes a ton of sense to me.
This has become a lot more appealing to me in the last 24 hours. I've
attached [attachment:35658.44.diff], which starts to make that conversion.
The handling of `$object_type` into a base/sub type is a little rough, but
all tests are passing.
`register_meta( 'post:post', 'my_meta_key' );`
Replying to [comment:95 jeremyfelt]:
> * We should consider removing `object_subtype` key from the meta key
array. It doesn't really serve a purpose as its used to build the array
containing the meta key instead.
This is another side effect of collapsing the array, which makes me happy
as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35658#comment:115>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list