Changeset 8595 for trunk/wp-includes/update.php
- Timestamp:
- 08/08/2008 10:49:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/update.php
r8516 r8595 41 41 $new_option->version_checked = $wp_version; 42 42 43 $url = "http://api.wordpress.org/core/version-check/1. 1/?version=$wp_version&php=$php_version&locale=$locale";43 $url = "http://api.wordpress.org/core/version-check/1.2/?version=$wp_version&php=$php_version&locale=$locale"; 44 44 $options = array('timeout' => 3); 45 45 … … 51 51 $response = wp_remote_request($url, $options, $headers); 52 52 53 if ( 200 != $response['response']['code'] )53 if ( 200 != $response['response']['code'] ) 54 54 return false; 55 55 56 56 $body = $response['body']; 57 58 $body = trim( $response[1] ); 57 $body = trim( $body ); 59 58 $body = str_replace(array("\r\n", "\r"), "\n", $body); 60 61 59 $returns = explode("\n", $body); 62 60 … … 65 63 $new_option->url = clean_url( $returns[1] ); 66 64 if ( isset( $returns[2] ) ) 67 $new_option->current = attribute_escape( $returns[2] ); 65 $new_option->package = clean_url( $returns[2] ); 66 if ( isset( $returns[3] ) ) 67 $new_option->current = attribute_escape( $returns[3] ); 68 if ( isset( $returns[4] ) ) 69 $new_option->locale = attribute_escape( $returns[4] ); 68 70 69 71 update_option( 'update_core', $new_option );
Note: See TracChangeset
for help on using the changeset viewer.