Summery Summery
Sends a Link header for the REST API.
Syntax Syntax
Source Source
File: wp-includes/rest-api.php
* 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.
*
* @since 5.3.0
*
* @param string $field A field to test for inclusion in the response body.
* @param array $fields An array of string fields supported by the endpoint.
* @return bool Whether to include the field or not.
*/
function rest_is_field_included( $field, $fields ) {
if ( in_array( $field, $fields, true ) ) {
return true;
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |