[wp-trac] [WordPress Trac] #54422: WP_REST_Templates_Controller does not respect the fields param

WordPress Trac noreply at wordpress.org
Tue Nov 16 18:05:03 UTC 2021


#54422: WP_REST_Templates_Controller does not respect the fields param
--------------------------------------+---------------------------
 Reporter:  spacedmonkey              |       Owner:  spacedmonkey
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.9
Component:  REST API                  |     Version:  5.8
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+---------------------------
Changes (by spacedmonkey):

 * owner:  (none) => spacedmonkey
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52186" 52186]:
 {{{
 #!CommitTicketReference repository="" revision="52186"
 REST API: Make the templates controller follow core REST patterns.

 The templates controller now respects the `_fields` parameter and filters
 the response accordingly. The schema has been updated to include all the
 fields returned. The `content.block_version` field has been added. The
 controller now returns WP_Error objects for improved error handling.

 Add new unit tests.

 Props TimothyBlynJacobs, hellofromtonya, zieladam.
 Fixes #54422.
 }}}

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


More information about the wp-trac mailing list