rest_is_field_included ( $field, $fields )

  • (string) field A field to test for inclusion in the response body.
  • (array) fields An array of string fields supported by the endpoint.
  • (bool) Whether to include the field or not.
Defined at:


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.

Related Functions

rest_is_ip_address, rest_is_integer, rest_api_loaded, tinymce_include, rss_enclosure

Top Google Results

User discussions

wpseek mobile