apply_filters( 'http_request_version', string $version, string $url )
- Since
- 2.7.0, 5.1.0
Filters the version of the HTTP protocol used in a request.
Parameters
$versionstring- Version of HTTP used. Accepts '1.0' and '1.1'. Default '1.0'.
$urlstring- The request URL.
Fired at · 1
wp-includes/class-wp-http.php:201WP_Http::request()
Source
* @since 2.7.0 * @since 5.1.0 The `$url` parameter was added. * * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'. Default '1.0'. * @param string $url The request URL. */ 'httpversion' => apply_filters( 'http_request_version', '1.0', $url ), /** * Filters the user agent value sent with an HTTP request. * * @since 2.7.0 * @since 5.1.0 The `$url` parameter was added. *History
Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.1.0
The
$url parameter was added.from the docblock2.7.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.