WordPress.org

Make WordPress Core

Changeset 21201


Ignore:
Timestamp:
06/30/12 12:58:03 (22 months ago)
Author:
nacin
Message:

Remove more code not specific to updating core from core_upgrade_preamble(). fixes #21124.

File:
1 edited

Legend:

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

    r21199 r21201  
    132132 */ 
    133133function core_upgrade_preamble() { 
    134     global $upgrade_error, $wp_version; 
     134    global $wp_version; 
    135135 
    136136    $updates = get_core_updates(); 
    137  
    138     if ( $upgrade_error ) { 
    139         echo '<div class="error"><p>'; 
    140         if ( $upgrade_error == 'themes' ) 
    141             _e('Please select one or more themes to update.'); 
    142         else 
    143             _e('Please select one or more plugins to update.'); 
    144         echo '</p></div>'; 
    145     } 
    146  
    147     echo '<p>'; 
    148     /* translators: %1 date, %2 time. */ 
    149     printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); 
    150     echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>'; 
    151     echo '</p>'; 
    152137 
    153138    if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) { 
     
    449434    <h2><?php _e('WordPress Updates'); ?></h2> 
    450435    <?php 
     436    if ( $upgrade_error ) { 
     437        echo '<div class="error"><p>'; 
     438        if ( $upgrade_error == 'themes' ) 
     439            _e('Please select one or more themes to update.'); 
     440        else 
     441            _e('Please select one or more plugins to update.'); 
     442        echo '</p></div>'; 
     443    } 
     444 
     445    echo '<p>'; 
     446    /* translators: %1 date, %2 time. */ 
     447    printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); 
     448    echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>'; 
     449    echo '</p>'; 
     450 
    451451    if ( current_user_can( 'update_core' ) ) 
    452452        core_upgrade_preamble(); 
Note: See TracChangeset for help on using the changeset viewer.