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:
Dion Hulse 2012-07-07 02:27:13 +00:00
parent 21aefa4e4f
commit f2bd679b96
1 changed files with 4 additions and 0 deletions

View File

@ -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;