rest_page_item_schema filter-hookWP 5.4.0

Filters the post's schema.

This is one of the variants of the dynamic hook rest_(post_type)_item_schema

Usage

add_filter( 'rest_page_item_schema', 'wp_kama_rest_page_item_schema_filter' );

/**
 * Function for `rest_page_item_schema` filter-hook.
 * 
 * @param array $schema Item schema data.
 *
 * @return array
 */
function wp_kama_rest_page_item_schema_filter( $schema ){

	// filter...
	return $schema;
}
$schema(array)
Item schema data.

Changelog

Since 5.4.0 Introduced.

Where the hook is called

WP_REST_Posts_Controller::get_item_schema()
rest_page_item_schema
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 2563
$schema = apply_filters( "rest_{$this->post_type}_item_schema", $schema );

Where the hook is used in WordPress

Usage not found.