### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
|
| 19 | 19 | * |
| 20 | 20 | * @return WP_Http HTTP Transport object. |
| 21 | 21 | */ |
| 22 | | function &_wp_http_get_object() { |
| | 22 | function _wp_http_get_object() { |
| 23 | 23 | static $http; |
| 24 | 24 | |
| 25 | 25 | if ( is_null($http) ) |
| … |
… |
|
| 56 | 56 | * @return WP_Error|array The response or WP_Error on failure. |
| 57 | 57 | */ |
| 58 | 58 | function wp_remote_request($url, $args = array()) { |
| 59 | | $objFetchSite = _wp_http_get_object(); |
| 60 | | return $objFetchSite->request($url, $args); |
| | 59 | return _wp_http_get_object()->request($url, $args); |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | /** |
| … |
… |
|
| 72 | 71 | * @return WP_Error|array The response or WP_Error on failure. |
| 73 | 72 | */ |
| 74 | 73 | function wp_remote_get($url, $args = array()) { |
| 75 | | $objFetchSite = _wp_http_get_object(); |
| 76 | | return $objFetchSite->get($url, $args); |
| | 74 | return _wp_http_get_object()->get($url, $args); |
| 77 | 75 | } |
| 78 | 76 | |
| 79 | 77 | /** |
| … |
… |
|
| 88 | 86 | * @return WP_Error|array The response or WP_Error on failure. |
| 89 | 87 | */ |
| 90 | 88 | function wp_remote_post($url, $args = array()) { |
| 91 | | $objFetchSite = _wp_http_get_object(); |
| 92 | | return $objFetchSite->post($url, $args); |
| | 89 | return _wp_http_get_object()->post($url, $args); |
| 93 | 90 | } |
| 94 | 91 | |
| 95 | 92 | /** |
| … |
… |
|
| 104 | 101 | * @return WP_Error|array The response or WP_Error on failure. |
| 105 | 102 | */ |
| 106 | 103 | function wp_remote_head($url, $args = array()) { |
| 107 | | $objFetchSite = _wp_http_get_object(); |
| 108 | | return $objFetchSite->head($url, $args); |
| | 104 | return _wp_http_get_object()->head($url, $args); |
| 109 | 105 | } |
| 110 | 106 | |
| 111 | 107 | /** |