apply_filters( 'rest_url_details_http_request_args', array $args, string $url )
- Since
- 5.9.0
Filters the HTTP request args for URL data retrieval.
Description
Can be used to adjust response size limit and other WP_Http::request() args.
Compatibility
- WordPress
- since 5.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$argsarray- Arguments used for the HTTP request.
$urlstring- The attempted URL.
Where this hook fires · 1
wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php:252WP_REST_URL_Details_Controller::get_remote_url()
Source code
* * @since 5.9.0 * * @param array $args Arguments used for the HTTP request. * @param string $url The attempted URL. */ $args = apply_filters( 'rest_url_details_http_request_args', $args, $url ); $response = wp_safe_remote_get( $url, $args ); if ( WP_Http::OK !== wp_remote_retrieve_response_code( $response ) ) { // Not saving the error response to cache since the error might be temporary. return new WP_Error(Changelog
Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.