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

WordPress Trac noreply at wordpress.org
Fri Jan 29 14:15:41 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              |   Keywords:  needs-patch needs-unit-tests
  Focuses:                      |
--------------------------------+------------------------------------------
 During a discussion at the REST API hack day, we determined it would be
 useful to expand the scope of `register_meta()` so that specific
 information about that meta data could be registered in code rather than
 in the DB, similar to `register_content_type()`. #metameta

 For the benefit of the REST API, this information should at least include
 the expected data type and the description so that a more proper JSON
 Schema for the endpoint can be provided. We don't need to be strict on the
 data type as the meta value is output, but we can help to set
 expectations.

 It may also be necessary to register the publicness of meta in a more
 explicit way through a `show_in_rest` or similar argument.

 There are likely other areas in core that could benefit from having
 additional information about registered meta.

 Related REST API Tickets:
 * https://github.com/WP-API/WP-API/issues/2149
 * https://github.com/WP-API/WP-API/issues/1425

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


More information about the wp-trac mailing list