[wp-trac] [WordPress Trac] #45220: register_rest_field() doesn't work when schema is empty (was: register_rest_field doesn't work)

WordPress Trac noreply at wordpress.org
Sat Nov 17 01:00:36 UTC 2018


#45220: register_rest_field() doesn't work when schema is empty
---------------------------------------------+-----------------------
 Reporter:  Dudo                             |       Owner:  (none)
     Type:  defect (bug)                     |      Status:  new
 Priority:  normal                           |   Milestone:  5.0
Component:  REST API                         |     Version:  5.0
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------
Changes (by danielbachhuber):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests
               commit


Comment:

 The culprit was r43736.

 In [attachment:45220.1.diff], `?_fields=` filtering is only applied when
 `?_fields=` is present in the request. I ''think'' this is the proper way
 to go about this, but it's the Friday of a very long week so I'm going to
 let it sit until early next.

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


More information about the wp-trac mailing list