WPDev.one
Core Function
View Source on Trac ↗

rest_is_field_included()

rest_is_field_included( mixed $field, mixed $fields )

Given an array of fields to include in a response, some of which may be

Parameters 2 required

Name / Type Description
$field
string

A field to test for inclusion in the response body.

Required
$fields
array

An array of string fields supported by the endpoint.

Required

Return Value

(bool)
Whether to include the field or not.

Function Information

Since Version
5.3.0
Source File
wp-includes/rest-api.php
Advertisement