apply_filters( 'pre_http_send_through_proxy', bool|null $override, string $uri, array $check, array $home )
- Since
- 3.5.0
Filters whether to preempt sending the request through the proxy.
Description
Returning false will bypass the proxy; returning true will send the request through the proxy. Returning null bypasses the filter.
Compatibility
- WordPress
- since 3.5.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
$overridebool|null- Whether to send the request through the proxy. Default null.
$uristring- URL of the request.
$checkarray- Associative array result of parsing the request URL with
parse_url(). $homearray- Associative array result of parsing the site URL with
parse_url().
Where this hook fires · 1
wp-includes/class-wp-http-proxy.php:194WP_HTTP_Proxy::send_through_proxy()
Source code
* * @param bool|null $override Whether to send the request through the proxy. Default null. * @param string $uri URL of the request. * @param array $check Associative array result of parsing the request URL with `parse_url()`. * @param array $home Associative array result of parsing the site URL with `parse_url()`. */ $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home ); if ( ! is_null( $result ) ) { return $result; } if ( 'localhost' === $check['host'] || ( isset( $home['host'] ) && $home['host'] === $check['host'] ) ) { return false;Changelog
Introduced in 3.5.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.9.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.