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.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |