rest_prepare_theme WordPress Filter Hook
The rest_prepare_theme hook is used to filter the response data for a theme request. This hook is used to add extra data to the response object, or to filter the response data before it is returned to the client.
apply_filters( 'rest_prepare_theme', WP_REST_Response $response , WP_Theme $theme , WP_REST_Request $request ) #
Filters theme data returned from the REST API.
Parameters
- $response
(WP_REST_Response)The response object.
- $theme
(WP_Theme)Theme object used to create response.
- $request
(WP_REST_Request)Request object.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |