On this page
apply_filters( 'rest_route_data', array[] $available, array $routes )
Filters the publicly-visible data for REST API routes.
Description
This data is exposed on indexes and can be used by clients or developers to investigate the site and find out how to use it. It acts as a form of self-documentation.
Parameters
$availablearray[]-
Route data to expose in indexes, keyed by route.
$routesarray-
Internal route data as an associative array.
Source
File: wp-includes/rest-api/class-wp-rest-server.php. View all references
return apply_filters( 'rest_route_data', $available, $routes );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Server::get_data_for_routes() wp-includes/rest-api/class-wp-rest-server.php | Retrieves the publicly-visible data for routes. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_route_data