[wp-trac] [WordPress Trac] #43941: Add default value to register meta

WordPress Trac noreply at wordpress.org
Tue Jul 7 18:04:07 UTC 2020


#43941: Add default value to register meta
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  TimothyBlynJacobs
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.6
Component:  Options, Meta APIs                   |     Version:  4.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  rest-api
  note                                           |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):

 * milestone:  5.5 => 5.6


Comment:

 Unfortunately we need to punt this to 5.6, we discovered some issues
 related to single array meta keys where the meta value returned would be
 invalid if requested with `$single => false` in `get_metadata`.

 In the existing test cases, this worked for the REST API because of its
 sanitization. But it wouldn't be able to for more complex examples. For
 non REST consumers, the values would also be invalid.

 https://wordpress.slack.com/archives/C02RQC26G/p1594143017123200

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


More information about the wp-trac mailing list