WP_HTTP: Add a filter to WP_HTTP_Proxy::send_through_proxy() to allow for plugins to modify which requests are sent to a proxy dynamically. Fixes #20222
git-svn-id: https://develop.svn.wordpress.org/trunk@21225 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
21aefa4e4f
commit
f2bd679b96
|
@ -1392,6 +1392,10 @@ class WP_HTTP_Proxy {
|
||||||
|
|
||||||
$home = parse_url( get_option('siteurl') );
|
$home = parse_url( get_option('siteurl') );
|
||||||
|
|
||||||
|
$result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home );
|
||||||
|
if ( ! is_null( $result ) )
|
||||||
|
return $result;
|
||||||
|
|
||||||
if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] )
|
if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue