rest_endpoints_description
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
rest_endpoints_description
wp-includes/rest-api/class-wp-rest-server.php 1519
$available[ $route ] = apply_filters( 'rest_endpoints_description', $data );