Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

rest_is_field_included()

3 tags 1 category

rest_is_field_included() — Given an array of fields to include in a response, some of which may be nested.fields, determine whether the provided field should be included in the response body. If a parent field is passed in, the presence of any nested field within that parent will cause the method to return true. For example “title” will return true if any of title, title.raw or title.rendered is provided.

Inputs: $field (string): A field to test for inclusion in the response body. $fields (array): An array of string fields supported by the endpoint.

Returns bool: Whether to include the field or not.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…