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

git-svn-id: http://core.svn.wordpress.org/trunk@21201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-06-30 12:58:03 +00:00
parent 5b285e0803
commit bc33fe2e0e
1 changed files with 16 additions and 16 deletions

View File

@ -131,25 +131,10 @@ function dismissed_updates() {
* @return null
*/
function core_upgrade_preamble() {
global $upgrade_error, $wp_version;
global $wp_version;
$updates = get_core_updates();
if ( $upgrade_error ) {
echo '<div class="error"><p>';
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 ' &nbsp; <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.');
@ -448,6 +433,21 @@ if ( 'upgrade-core' == $action ) {
<?php screen_icon('tools'); ?>
<h2><?php _e('WordPress Updates'); ?></h2>
<?php
if ( $upgrade_error ) {
echo '<div class="error"><p>';
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 ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
echo '</p>';
if ( current_user_can( 'update_core' ) )
core_upgrade_preamble();
if ( current_user_can( 'update_plugins' ) )