[wp-trac] [WordPress Trac] #43874: REST API: Only render fields specific to request when _fields= is used
WordPress Trac
noreply at wordpress.org
Thu Apr 26 22:06:17 UTC 2018
#43874: REST API: Only render fields specific to request when _fields= is used
-----------------------------------+--------------------
Reporter: danielbachhuber | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.6
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: rest-api, performance |
-----------------------------------+--------------------
Given a request like:
{{{
GET wp/v2/posts?_fields=id,title
}}}
It doesn't make sense for the REST API to generate `content` for each
response object, only to later discard it.
Instead, if `_fields=` is used, we should only render the fields
specified.
Previously #38131
From https://github.com/WordPress/gutenberg/issues/5376
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43874>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list