WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2011 05:37:51 AM (10 years ago)
Author:
nacin
Message:

Update Core UI changes:

  • Update Now instead of Update Automatically.
  • The first core update is now a primary button.
  • Hide the version number from the 'You are about to install WP in English' warning for development versions, as it lies and suggests you will be downgraded.

see #10611.

File:
1 edited

Legend:

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

    r17748 r18224  
    2020function list_core_update( $update ) {
    2121    global $wp_local_package, $wpdb;
     22    static $first_pass = true;
     23
    2224    $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ?
    2325            $update->current : sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
     
    2527    if ( !isset($update->response) || 'latest' == $update->response )
    2628        $current = true;
    27     $submit = __('Update Automatically');
     29    $submit = __('Update Now');
    2830    $form_action = 'update-core.php?action=do-core-upgrade';
    2931    $php_version    = phpversion();
     
    3638        if ( $current ) {
    3739            $message = sprintf(__('You have the latest version of WordPress. You do not need to update. However, if you want to re-install version %s, you can do so automatically or download the package and re-install manually:'), $version_string);
    38             $submit = __('Re-install Automatically');
     40            $submit = __('Re-install Now');
    3941            $form_action = 'update-core.php?action=do-core-reinstall';
    4042        } else {
     
    6466    echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';
    6567    if ( $show_buttons ) {
    66         submit_button( $submit, 'button', 'upgrade', false );
    67         echo '&nbsp;<a href="' . esc_url($update->package) . '" class="button">' . $download . '</a>&nbsp;';
     68        if ( $first_pass ) {
     69            submit_button( $submit, 'button button-primary', 'upgrade', false );
     70            $first_pass = false;
     71        } else {
     72            submit_button( $submit, 'button', 'upgrade', false );
     73        }
     74        echo '&nbsp;<a href="' . esc_url( $update->package ) . '" class="button">' . $download . '</a>&nbsp;';
    6875    }
    6976    if ( 'en_US' != $update->locale )
     
    7683        echo '<p class="hint">'.__('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.').'</p>';
    7784    else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) {
    78         echo '<p class="hint">'.sprintf( __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), $update->current ).'</p>';
     85        echo '<p class="hint">'.sprintf( __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), $update->response != 'development' ? $update->current : '' ).'</p>';
    7986    }
    8087    echo '</form>';
Note: See TracChangeset for help on using the changeset viewer.