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

WordPress Trac noreply at wordpress.org
Mon Feb 1 17:16:10 UTC 2016


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

Comment (by jeremyfelt):

 Replying to [comment:11 sc0ttkclark]:
 > In the Fields API, we're doing some stuff with `register_meta` and
 `register_rest_field` right now, I'm wondering if we should wait on this
 ticket and first discuss what the best way forward is:

 +1, we do need to keep gathering requirements from all around. The above
 was a pretty big jump start.

 > 1. Merging the patch as is, Fields API adding integration with that
 > 2. Moving some of this logic into the Fields API

 Looking at how the Fields API uses `register_meta()`, it seems like option
 1 should be fairly straight forward, though that depends on how
 `register_rest_field()` is being relied on.

 Anything registered as "show_in_rest" (public) with `register_meta()`
 would be added to a list of all public meta key/values that would be
 included when public meta is requested from an object's endpoint. We
 decided that the current use of `register_meta()` was not enough to
 explicitly define publicness. And we need a way to create a JSON Schema
 showing the registered public meta, even when not requesting the data.

 Anything meta separately registered with `register_rest_field()` would
 likely **not** be registered this way as it would be included with the
 object's endpoint as a custom field.

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


More information about the wp-trac mailing list