Make WordPress Core

Ticket #25831: 25831.diff

File 25831.diff, 1.6 KB (added by dd32, 11 years ago)
  • src/wp-admin/update-core.php

     
    488488
    489489if ( 'upgrade-core' == $action ) {
    490490
    491         wp_version_check();
     491        $stats = array();
     492        if ( !empty( $_GET['force-check'] ) )
     493                $stats['force-check'] = 1;
     494        wp_version_check( $stats );
     495
    492496        require_once(ABSPATH . 'wp-admin/admin-header.php');
    493497        ?>
    494498        <div class="wrap">
     
    507511        echo '<p>';
    508512        /* translators: %1 date, %2 time. */
    509513        printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) );
    510         echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
     514        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
    511515        echo '</p>';
    512516
    513517        if ( $core = current_user_can( 'update_core' ) )
  • src/wp-includes/update.php

     
    3131        $current = get_site_transient( 'update_core' );
    3232        $translations = wp_get_installed_translations( 'core' );
    3333
     34        // Invalidate transient upon $wp_version changes
     35        if ( is_object( $current ) && $wp_version != $current->version_checked )
     36                $current = false;
     37
    3438        if ( ! is_object($current) ) {
    3539                $current = new stdClass;
    3640                $current->updates = array();