Changeset 9051
- Timestamp:
- 10/02/2008 12:32:21 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-links.php
r9011 r9051 39 39 $response = wp_remote_get('http://api.pingomatic.com/updated-batch/', $options); 40 40 41 if ( is_wp_error( $response ) ) 42 wp_die(__('Request Failed.')); 43 41 44 if ( $response['response']['code'] != 200 ) 42 45 wp_die(__('Request Failed.')); -
trunk/wp-includes/comment.php
r9039 r9051 1317 1317 ); 1318 1318 1319 wp_remote_post($trackback_url, $options); 1319 $response = wp_remote_post($trackback_url, $options); 1320 1321 if ( is_wp_error( $response ) ) 1322 return; 1320 1323 1321 1324 $tb_url = addslashes( $trackback_url ); -
trunk/wp-includes/functions.php
r9025 r9051 1040 1040 $response = wp_remote_request($url, $options); 1041 1041 1042 if ( is_wp_error( $response ) ) 1043 return false; 1044 1042 1045 $headers = wp_remote_retrieve_headers( $response ); 1043 1046 if ( false == $file_path ) … … 1073 1076 function wp_get_http_headers( $url, $deprecated = false ) { 1074 1077 $response = wp_remote_head( $url ); 1078 1079 if ( is_wp_error( $response ) ) 1080 return false; 1081 1075 1082 return wp_remote_retrieve_headers( $response ); 1076 1083 } … … 1241 1248 * 1242 1249 * @param string $uri URI/URL of web page to retrieve. 1243 * @return string HTTP content.1250 * @return bool|string HTTP content. False on failure. 1244 1251 */ 1245 1252 function wp_remote_fopen( $uri ) { 1246 // parse url() should not be used for validation of URLs.1247 // Keeping anyway, since the Filter extension is not available on all servers.1248 1253 $parsed_url = @parse_url( $uri ); 1249 1254 … … 1255 1260 1256 1261 $response = wp_remote_get( $uri, $options ); 1262 1263 if ( is_wp_error( $response ) ) 1264 return false; 1257 1265 1258 1266 return $response['body'];
Note: See TracChangeset
for help on using the changeset viewer.