rest_url_details_http_request_args
Filters the HTTP request args for URL data retrieval.
Can be used to adjust response size limit and other WP_Http::request() args.
Usage
add_filter( 'rest_url_details_http_request_args', 'wp_kama_rest_url_details_http_request_args_filter', 10, 2 );
/**
* Function for `rest_url_details_http_request_args` filter-hook.
*
* @param array $args Arguments used for the HTTP request.
* @param string $url The attempted URL.
*
* @return array
*/
function wp_kama_rest_url_details_http_request_args_filter( $args, $url ){
// filter...
return $args;
}
- $args(array)
- Arguments used for the HTTP request.
- $url(string)
- The attempted URL.
Changelog
| Since 5.9.0 | Introduced. |
Where the hook is called
rest_url_details_http_request_args
wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php 252
$args = apply_filters( 'rest_url_details_http_request_args', $args, $url );