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

WordPress Trac noreply at wordpress.org
Thu May 19 00:25:27 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 rest-api                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by danielbachhuber):

 Replying to [comment:39 sc0ttkclark]:

 > And there also remains the decisions on exactly how to utilize the
 `schema` property and what [https://make.wordpress.org/core/2016/05/03/a
 -data-schema-for-meta/ Data Schema] to use. There will be further
 discussion about this in today's weekly dev chat meeting.

 In a bit of hindsight, I think the debate about JSON Schema doesn't
 necessarily need to come to a conclusion to solve this ticket.

 Back to @jeremyfelt's original description:

 > 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.

 Of JSON Schema, all we really need at this point is the data type for the
 attribute / meta we're registering. If we include `data_type` or similar
 as a registration argument, where the value can be one of array, boolean,
 integer, number, null, object, or string, then we solve the immediate need
 of the ticket.

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


More information about the wp-trac mailing list