rest_endpoints_description filter-hookWP 4.4.0

Filters the publicly-visible data for a single REST API route.

Usage

add_filter( 'rest_endpoints_description', 'wp_kama_rest_endpoints_description_filter' );

/**
 * Function for `rest_endpoints_description` filter-hook.
 * 
 * @param array $data Publicly-visible data for the route.
 *
 * @return array
 */
function wp_kama_rest_endpoints_description_filter( $data ){

	// filter...
	return $data;
}
$data(array)
Publicly-visible data for the route.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

WP_REST_Server::get_data_for_routes()
rest_endpoints_description
wp-includes/rest-api/class-wp-rest-server.php 1410
$available[ $route ] = apply_filters( 'rest_endpoints_description', $data );

Where the hook is used in WordPress

Usage not found.