rest_namespace_index WordPress Filter Hook
The rest_namespace_index hook allows you to add or remove data from the WordPress REST API response for the index of a namespace.
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
- $response
(WP_REST_Response)Response data.
- $request
(WP_REST_Request)Request data. The namespace is passed as the 'namespace' parameter.
Source
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |