rest_prepare_url_details WordPress Filter Hook

The rest_prepare_url_details hook is used to modify the response data for a request to the WordPress REST API. This hook is called after the data for the request has been fetched from the database, but before it is passed to the REST API response handler.

apply_filters( 'rest_prepare_url_details', WP_REST_Response $response, string $url, WP_REST_Request $request, string $remote_url_response ) #

Filters the URL data for the response.


Parameters

$response

(WP_REST_Response)The response object.

$url

(string)The requested URL.

$request

(WP_REST_Request)Request object.

$remote_url_response

(string)HTTP response body from the remote URL.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.9.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.