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

WordPress Trac noreply at wordpress.org
Mon Feb 1 22:12:12 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 joehoyle):

 > I guess this is more of a problem at the REST API layer, which could
 feasibly check for is_serialized() and avoid providing bad data.

 In the REST API we'd potentially be able to allow serialized data given
 we'd be able to sanitize the data on output and input. For example, if you
 register meta which is of type `arrayOf` `number` theres no reason we
 couldn't validate based off that. Right now we don't actually have support
 for that, but JSON Schema supports this and should be expected to be added
 in the REST API at some point.

 I'd imagine arrayOfType will be useful elsewhere too, not just the REST
 API.

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


More information about the wp-trac mailing list