Changeset 32599
- Timestamp:
- 05/25/2015 05:31:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/http.php
r30674 r32599 17 17 * @since 2.7.0 18 18 * @access private 19 * 20 * @staticvar WP_Http $http 19 21 * 20 22 * @return WP_Http HTTP Transport object. … … 150 152 */ 151 153 function wp_remote_request($url, $args = array()) { 152 $ objFetchSite= _wp_http_get_object();153 return $ objFetchSite->request($url, $args);154 $http = _wp_http_get_object(); 155 return $http->request( $url, $args ); 154 156 } 155 157 … … 167 169 */ 168 170 function wp_remote_get($url, $args = array()) { 169 $ objFetchSite= _wp_http_get_object();170 return $ objFetchSite->get($url, $args);171 $http = _wp_http_get_object(); 172 return $http->get( $url, $args ); 171 173 } 172 174 … … 184 186 */ 185 187 function wp_remote_post($url, $args = array()) { 186 $ objFetchSite= _wp_http_get_object();187 return $ objFetchSite->post($url, $args);188 $http = _wp_http_get_object(); 189 return $http->post( $url, $args ); 188 190 } 189 191 … … 201 203 */ 202 204 function wp_remote_head($url, $args = array()) { 203 $ objFetchSite= _wp_http_get_object();204 return $ objFetchSite->head($url, $args);205 $http = _wp_http_get_object(); 206 return $http->head( $url, $args ); 205 207 } 206 208 … … 225 227 * @since 2.7.0 226 228 * 227 * @param array $response229 * @param array $response 228 230 * @param string $header Header name to retrieve value from. 229 231 * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist. … … 294 296 * 295 297 * @param array $capabilities Array of capabilities to test or a wp_remote_request() $args array. 296 * @param string $url Optional. If given, will check if the URL requires SSL and adds that requirement to the capabilities array. 298 * @param string $url Optional. If given, will check if the URL requires SSL and adds 299 * that requirement to the capabilities array. 297 300 * 298 301 * @return bool 299 302 */ 300 303 function wp_http_supports( $capabilities = array(), $url = null ) { 301 $ objFetchSite= _wp_http_get_object();304 $http = _wp_http_get_object(); 302 305 303 306 $capabilities = wp_parse_args( $capabilities ); … … 317 320 } 318 321 319 return (bool) $ objFetchSite->_get_first_available_transport( $capabilities );322 return (bool) $http->_get_first_available_transport( $capabilities ); 320 323 } 321 324 … … 383 386 * 384 387 * @param null|string $origin Origin URL. If not provided, the value of get_http_origin() is used. 385 * @return bool|nullTrue if the origin is allowed. False otherwise.388 * @return string True if the origin is allowed. False otherwise. 386 389 */ 387 390 function is_allowed_http_origin( $origin = null ) { … … 399 402 * @since 3.4.0 400 403 * 401 * @param string $origin Result of check for allowed origin.402 * @param string $origin_arg original origin string passed into is_allowed_http_origin function.404 * @param string $origin Result of check for allowed origin. 405 * @param string $origin_arg Original origin string passed into is_allowed_http_origin function. 403 406 */ 404 407 return apply_filters( 'allowed_http_origin', $origin, $origin_arg ); … … 415 418 * @since 3.4.0 416 419 * 417 * @return bool|stringReturns the origin URL if headers are sent. Returns false418 * if headers are not sent.420 * @return string|false Returns the origin URL if headers are sent. Returns false 421 * if headers are not sent. 419 422 */ 420 423 function send_origin_headers() { … … 488 491 * @since 3.6.0 489 492 * 490 * @param bool false Whether HTTP request is external or not.493 * @param bool false Whether HTTP request is external or not. 491 494 * @param string $host IP of the requested host. 492 * @param string $url URL of the requested host.495 * @param string $url URL of the requested host. 493 496 */ 494 497 if ( ! apply_filters( 'http_request_host_is_external', false, $host, $url ) ) … … 518 521 * @since 3.6.0 519 522 * 520 * @param bool $is_external523 * @param bool $is_external 521 524 * @param string $host 522 525 * @return bool … … 535 538 * @since 3.6.0 536 539 * 537 * @param bool $is_external 540 * @global wpdb $wpdb 541 * @staticvar array $queried 542 * 543 * @param bool $is_external 538 544 * @param string $host 539 545 * @return bool
Note: See TracChangeset
for help on using the changeset viewer.