On this page
apply_filters( 'rest_namespace_index', WP_REST_Response $response, WP_REST_Request $request )
Filters the REST API namespace index data.
Description
This typically is just the route data for the namespace, but you can add any data you’d like here.
Parameters
$responseWP_REST_Response-
Response data.
$requestWP_REST_Request-
Request data. The namespace is passed as the
'namespace'parameter.
Source
File: wp-includes/rest-api/class-wp-rest-server.php. View all references
return apply_filters( 'rest_namespace_index', $response, $request );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Server::get_namespace_index() wp-includes/rest-api/class-wp-rest-server.php | Retrieves the index for a namespace. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_namespace_index