rest_index WordPress Filter Hook
The rest_index hook is used to modify the response data that is returned when an index request is made. This hook allows you to add, remove, or modify data before it is returned to the client.
apply_filters( 'rest_index', WP_REST_Response $response , WP_REST_Request $request ) #
Filters the REST API root index data.
Description
This contains the data describing the API. This includes information about supported authentication schemes, supported namespaces, routes available on the API, and a small amount of data about the site.
Parameters
- $response
(WP_REST_Response)Response data.
- $request
(WP_REST_Request)Request data.
Source
Changelog
Version | Description |
---|---|
6.0.0 | Added $request parameter. |
4.4.0 | Introduced. |