WordPress.org

Make WordPress Core

Changeset 25219


Ignore:
Timestamp:
09/03/2013 03:21:59 AM (5 years ago)
Author:
dd32
Message:

Core Updates: Switch to using a new 1.7 version check API which will return extra auto-update packages when requested over SSL. The new API has switched to returning JSON. See #22704

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r25099 r25219  
    2525    global $wp_local_package, $wpdb;
    2626    static $first_pass = true;
     27
     28    // Don't show auto-updates in the updates page
     29    if ( isset( $update->response ) && 'autoupdate' == $update->response )
     30        return;
    2731
    2832    $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ?
  • trunk/src/wp-includes/update.php

    r23265 r25219  
    7676    );
    7777
    78     $url = 'http://api.wordpress.org/core/version-check/1.6/?' . http_build_query( $query, null, '&' );
     78    $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
     79
     80    if ( wp_http_supports( 'ssl' ) )
     81        $url = set_url_scheme( $url, 'https' );
    7982
    8083    $options = array(
     
    9396
    9497    $body = trim( wp_remote_retrieve_body( $response ) );
    95     $body = maybe_unserialize( $body );
     98    $body = json_decode( $body, true );
    9699
    97100    if ( ! is_array( $body ) || ! isset( $body['offers'] ) )
     
    111114        }
    112115        $offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale',
    113             'packages', 'current', 'php_version', 'mysql_version', 'new_bundled', 'partial_version' ), '' ) );
     116            'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version' ), '' ) );
    114117    }
    115118
Note: See TracChangeset for help on using the changeset viewer.