apply_filters( ‘rest_index’, WP_REST_Response $response, WP_REST_Request $request )

In this article

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

$responseWP_REST_Response
Response data.
$requestWP_REST_Request
Request data.

Source

return apply_filters( 'rest_index', $response, $request );

Changelog

VersionDescription
6.0.0Added $request parameter.
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.