to return a list of posts with only
author fields in situations where we don’t need all of the data contained in other fields like
media (see #38131). Since 4.9.8 we’ve made further improvements to skip computing fields we did not explicitly request when
_fields is present, saving time on the server in addition to slimming down the JSON response object.
In WordPress 5.3 we are adding the ability to filter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. by nested fields. Previously we could only request top-level properties like
meta, which would return the full content object (with
rendered properties when using an edit context) or the object containing all meta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. values. We can now specify a nested path such as
content.raw and the REST API will skip computing the rendered content, a useful performance boost for applications like Gutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ which only require that underlying raw post content.
Now that we can register complex array or object meta, we may similarly ask for only a few of many registered
meta fields, or certain properties within a complex object, using a query such as this:
(Note that this specific meta example depends on bugfix #48266, which will ship as part of RC1.)
Thank you @timothyblynjacobs, @dlh, @danielbachhuber, and @rmccue for assisting with the development of this useful feature!