WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r27929 r26192  
    169169 * @uses $wp_version Used to notify the WordPress version.
    170170 *
    171  * @param array $extra_stats Extra statistics to report to the WordPress.org API.
    172171 * @return mixed Returns null if update is unsupported. Returns false if check is too soon.
    173172 */
    174 function wp_update_plugins( $extra_stats = array() ) {
     173function wp_update_plugins() {
    175174    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    176175
     
    211210    $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
    212211
    213     if ( $time_not_changed && ! $extra_stats ) {
     212    if ( $time_not_changed ) {
    214213        $plugin_changed = false;
    215214        foreach ( $plugins as $file => $p ) {
     
    260259    );
    261260
    262     if ( $extra_stats ) {
    263         $options['body']['update_stats'] = json_encode( $extra_stats );
    264     }
    265 
    266261    $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/';
    267262    if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
     
    305300 * @uses $wp_version Used to notify the WordPress version.
    306301 *
    307  * @param array $extra_stats Extra statistics to report to the WordPress.org API.
    308302 * @return mixed Returns null if update is unsupported. Returns false if check is too soon.
    309303 */
    310 function wp_update_themes( $extra_stats = array() ) {
     304function wp_update_themes() {
    311305    include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
    312306
     
    358352    $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked );
    359353
    360     if ( $time_not_changed && ! $extra_stats ) {
     354    if ( $time_not_changed ) {
    361355        $theme_changed = false;
    362356        foreach ( $checked as $slug => $v ) {
     
    404398        'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
    405399    );
    406 
    407     if ( $extra_stats ) {
    408         $options['body']['update_stats'] = json_encode( $extra_stats );
    409     }
    410400
    411401    $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
     
    621611add_action( 'admin_init', '_maybe_update_plugins' );
    622612add_action( 'wp_update_plugins', 'wp_update_plugins' );
    623 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
     613add_action( 'upgrader_process_complete', 'wp_update_plugins' );
    624614
    625615add_action( 'load-themes.php', 'wp_update_themes' );
     
    628618add_action( 'admin_init', '_maybe_update_themes' );
    629619add_action( 'wp_update_themes', 'wp_update_themes' );
    630 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
     620add_action( 'upgrader_process_complete', 'wp_update_themes' );
    631621
    632622add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
Note: See TracChangeset for help on using the changeset viewer.