[wp-trac] [WordPress Trac] #45099: REST API: Render only additional fields specific to request when _fields= is used
WordPress Trac
noreply at wordpress.org
Wed Oct 17 02:40:27 UTC 2018
#45099: REST API: Render only additional fields specific to request when _fields=
is used
--------------------------------------+------------------------------
Reporter: dlh | Owner: danielbachhuber
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.0
Component: REST API | Version: 4.9.8
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Changes (by danielbachhuber):
* owner: (none) => danielbachhuber
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"43736" 43736]:
{{{
#!CommitTicketReference repository="" revision="43736"
REST API: Don't add fields to object when not included in `?_fields=`.
In [43087], we improved REST API performance by only rendering the fields
specified in the request. Similarly, any fields registered with
`register_rest_field()` should only be rendered when included in
`?_fields=`.
Props dlh.
Fixes #45099.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45099#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list