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: http://core.svn.wordpress.org/trunk@21225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
509b845abc
commit
9ed35c4586
|
@ -1392,6 +1392,10 @@ class WP_HTTP_Proxy {
|
|||
|
||||
$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'] )
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue