mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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: http://svn.automattic.com/wordpress/trunk@15996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f1f98fa02
commit
e58da4ac0a
@ -121,16 +121,25 @@ function core_upgrade_preamble() {
|
||||
<?php
|
||||
if ( $upgrade_error ) {
|
||||
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>';
|
||||
/* 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 ) {
|
||||
echo '<h3>';
|
||||
_e('You have the latest version of WordPress.');
|
||||
echo '</h3>';
|
||||
} 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.');
|
||||
echo '</p></div>';
|
||||
|
||||
@ -373,8 +382,9 @@ function no_update_actions($actions) {
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
|
||||
|
||||
$upgrade_error = false;
|
||||
if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) {
|
||||
$upgrade_error = true;
|
||||
if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! isset( $_GET['plugins'] ) ) )
|
||||
&& ! isset( $_POST['checked'] ) ) {
|
||||
$upgrade_error = $action == 'do-theme-upgrade' ? 'themes' : 'plugins';
|
||||
$action = 'upgrade-core';
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ Plugin Name: Hello Dolly
|
||||
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.
|
||||
Author: Matt Mullenweg
|
||||
Version: 1.5.1
|
||||
Version: 1.4
|
||||
Author URI: http://ma.tt/
|
||||
*/
|
||||
|
||||
|
@ -3,7 +3,7 @@ Theme Name: Twenty Ten
|
||||
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.
|
||||
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
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user