diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index c5768b9c24..1bd6f6945a 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -25,6 +25,10 @@ function list_core_update( $update ) { global $wp_local_package, $wpdb; static $first_pass = true; + // Don't show auto-updates in the updates page + if ( isset( $update->response ) && 'autoupdate' == $update->response ) + return; + $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ? $update->current : sprintf("%s–%s", $update->current, $update->locale); $current = false; diff --git a/wp-includes/update.php b/wp-includes/update.php index 61d163aaf4..05069e5c6f 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -75,7 +75,10 @@ function wp_version_check() { 'multisite_enabled' => $multisite_enabled ); - $url = 'http://api.wordpress.org/core/version-check/1.6/?' . http_build_query( $query, null, '&' ); + $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' ); + + if ( wp_http_supports( 'ssl' ) ) + $url = set_url_scheme( $url, 'https' ); $options = array( 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ), @@ -92,7 +95,7 @@ function wp_version_check() { return false; $body = trim( wp_remote_retrieve_body( $response ) ); - $body = maybe_unserialize( $body ); + $body = json_decode( $body, true ); if ( ! is_array( $body ) || ! isset( $body['offers'] ) ) return false; @@ -110,7 +113,7 @@ function wp_version_check() { $offer[ $offer_key ] = esc_html( $value ); } $offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale', - 'packages', 'current', 'php_version', 'mysql_version', 'new_bundled', 'partial_version' ), '' ) ); + 'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version' ), '' ) ); } $updates = new stdClass();