Make WordPress Core


Ignore:
Timestamp:
10/27/2010 02:21:49 AM (16 years ago)
Author:
nacin
Message:

Add 'Check Again' button and timestamp to update-core. Also return the same error message for themes as we do for plugins when no checkboxes are checked. fixes #14764.

File:
1 edited

Legend:

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

    r15979 r15996  
    122122        if ( $upgrade_error ) {
    123123                echo '<div class="error"><p>';
    124                 _e('Please select one or more plugins to upgrade.');
     124                if ( $upgrade_error == 'themes' )
     125                        _e('Please select one or more themes to update.');
     126                else
     127                        _e('Please select one or more plugins to update.');
    125128                echo '</p></div>';
    126129        }
     130
     131        echo '<p>';
     132        /* translators: %1 date, %2 time. */
     133        printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) );
     134        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
     135        echo '</p>';
    127136
    128137        if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
    … …  
    131140                echo '</h3>';
    132141        } else {
    133                 echo '<div class="updated"><p>';
     142                echo '<div class="updated inline"><p>';
    134143                _e('<strong>Important:</strong> before updating, please <a href="http://codex.wordpress.org/WordPress_Backups">back up your database and files</a>. For help with updates, visit the <a href="http://codex.wordpress.org/Updating_WordPress">Updating WordPress</a> Codex page.');
    135144                echo '</p></div>';
    … …  
    374383
    375384$upgrade_error = false;
    376 if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) {
    377         $upgrade_error = true;
     385if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! isset( $_GET['plugins'] ) ) )
     386        && ! isset( $_POST['checked'] ) ) {
     387        $upgrade_error = $action == 'do-theme-upgrade' ? 'themes' : 'plugins';
    378388        $action = 'upgrade-core';
    379389}
Note: See TracChangeset for help on using the changeset viewer.