wppaste
WordPress

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.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

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.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.7 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.