[wp-trac] [WordPress Trac] #35658: Provide additional data for registered meta through register_meta()

WordPress Trac noreply at wordpress.org
Sat Jan 30 11:54:06 UTC 2016


#35658: Provide additional data for registered meta through register_meta()
------------------------------------------+------------------------------
 Reporter:  jeremyfelt                    |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Options, Meta APIs            |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------------------

Comment (by joehoyle):

 Chatting today the issue of multiple meta key meta vs. single. Typically,
 a given meta registration will be either for a "single" key use case, or
 multiple. By specifying this in `register_meta` we'll be able to use it in
 the REST api to indicate whether to show an array of values for the key,
 or a single value it's self. This could also be used in core potentially
 when calling `get_post_meta` and defaulting the third param to the
 registered single / multiple flag.

 Given this is a new API, we shouldn't have to worry about backwards
 compatibility for things like `get_post_meta`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35658#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list