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.
git-svn-id: https://develop.svn.wordpress.org/trunk@15996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bcbb15ca21
commit
c1bbe2983f
|
@ -121,16 +121,25 @@ function core_upgrade_preamble() {
|
||||||
<?php
|
<?php
|
||||||
if ( $upgrade_error ) {
|
if ( $upgrade_error ) {
|
||||||
echo '<div class="error"><p>';
|
echo '<div class="error"><p>';
|
||||||
_e('Please select one or more plugins to upgrade.');
|
if ( $upgrade_error == 'themes' )
|
||||||
|
_e('Please select one or more themes to update.');
|
||||||
|
else
|
||||||
|
_e('Please select one or more plugins to update.');
|
||||||
echo '</p></div>';
|
echo '</p></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<p>';
|
||||||
|
/* translators: %1 date, %2 time. */
|
||||||
|
printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) );
|
||||||
|
echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
|
||||||
|
echo '</p>';
|
||||||
|
|
||||||
if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
|
if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
|
||||||
echo '<h3>';
|
echo '<h3>';
|
||||||
_e('You have the latest version of WordPress.');
|
_e('You have the latest version of WordPress.');
|
||||||
echo '</h3>';
|
echo '</h3>';
|
||||||
} else {
|
} else {
|
||||||
echo '<div class="updated"><p>';
|
echo '<div class="updated inline"><p>';
|
||||||
_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.');
|
_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.');
|
||||||
echo '</p></div>';
|
echo '</p></div>';
|
||||||
|
|
||||||
|
@ -373,8 +382,9 @@ function no_update_actions($actions) {
|
||||||
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
|
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
|
||||||
|
|
||||||
$upgrade_error = false;
|
$upgrade_error = false;
|
||||||
if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) {
|
if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! isset( $_GET['plugins'] ) ) )
|
||||||
$upgrade_error = true;
|
&& ! isset( $_POST['checked'] ) ) {
|
||||||
|
$upgrade_error = $action == 'do-theme-upgrade' ? 'themes' : 'plugins';
|
||||||
$action = 'upgrade-core';
|
$action = 'upgrade-core';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ Plugin Name: Hello Dolly
|
||||||
Plugin URI: http://wordpress.org/#
|
Plugin URI: http://wordpress.org/#
|
||||||
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
|
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
|
||||||
Author: Matt Mullenweg
|
Author: Matt Mullenweg
|
||||||
Version: 1.5.1
|
Version: 1.4
|
||||||
Author URI: http://ma.tt/
|
Author URI: http://ma.tt/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Theme Name: Twenty Ten
|
||||||
Theme URI: http://wordpress.org/
|
Theme URI: http://wordpress.org/
|
||||||
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
||||||
Author: the WordPress team
|
Author: the WordPress team
|
||||||
Version: 1.1
|
Version: 1.0.1
|
||||||
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
|
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue