Don use has_action() before do_action() in http.php, props Viper007Bond, fixes #10625
git-svn-id: http://svn.automattic.com/wordpress/trunk@11835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
235f560950
commit
5276c457f4
|
@ -118,7 +118,6 @@ class WP_Http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( has_filter('http_transport_get_debug') )
|
|
||||||
do_action( 'http_transport_get_debug', $working_transport, $blocking_transport, $nonblocking_transport );
|
do_action( 'http_transport_get_debug', $working_transport, $blocking_transport, $nonblocking_transport );
|
||||||
|
|
||||||
if ( isset($args['blocking']) && !$args['blocking'] )
|
if ( isset($args['blocking']) && !$args['blocking'] )
|
||||||
|
@ -166,7 +165,6 @@ class WP_Http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( has_filter('http_transport_post_debug') )
|
|
||||||
do_action( 'http_transport_post_debug', $working_transport, $blocking_transport, $nonblocking_transport );
|
do_action( 'http_transport_post_debug', $working_transport, $blocking_transport, $nonblocking_transport );
|
||||||
|
|
||||||
if ( isset($args['blocking']) && !$args['blocking'] )
|
if ( isset($args['blocking']) && !$args['blocking'] )
|
||||||
|
@ -300,14 +298,12 @@ class WP_Http {
|
||||||
$transports = WP_Http::_postTransport($r);
|
$transports = WP_Http::_postTransport($r);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( has_action('http_api_debug') )
|
|
||||||
do_action( 'http_api_debug', $transports, 'transports_list' );
|
do_action( 'http_api_debug', $transports, 'transports_list' );
|
||||||
|
|
||||||
$response = array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() );
|
$response = array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() );
|
||||||
foreach ( (array) $transports as $transport ) {
|
foreach ( (array) $transports as $transport ) {
|
||||||
$response = $transport->request($url, $r);
|
$response = $transport->request($url, $r);
|
||||||
|
|
||||||
if ( has_action('http_api_debug') )
|
|
||||||
do_action( 'http_api_debug', $response, 'response', get_class($transport) );
|
do_action( 'http_api_debug', $response, 'response', get_class($transport) );
|
||||||
|
|
||||||
if ( ! is_wp_error($response) )
|
if ( ! is_wp_error($response) )
|
||||||
|
|
Loading…
Reference in New Issue