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.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.