Remove more code not specific to updating core from core_upgrade_preamble(). fixes #21124.
git-svn-id: https://develop.svn.wordpress.org/trunk@21201 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c5d586e5bf
commit
ccba2c1f57
|
@ -131,25 +131,10 @@ function dismissed_updates() {
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function core_upgrade_preamble() {
|
function core_upgrade_preamble() {
|
||||||
global $upgrade_error, $wp_version;
|
global $wp_version;
|
||||||
|
|
||||||
$updates = get_core_updates();
|
$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 ' <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.');
|
||||||
|
@ -448,6 +433,21 @@ if ( 'upgrade-core' == $action ) {
|
||||||
<?php screen_icon('tools'); ?>
|
<?php screen_icon('tools'); ?>
|
||||||
<h2><?php _e('WordPress Updates'); ?></h2>
|
<h2><?php _e('WordPress Updates'); ?></h2>
|
||||||
<?php
|
<?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 ' <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>';
|
||||||
|
echo '</p>';
|
||||||
|
|
||||||
if ( current_user_can( 'update_core' ) )
|
if ( current_user_can( 'update_core' ) )
|
||||||
core_upgrade_preamble();
|
core_upgrade_preamble();
|
||||||
if ( current_user_can( 'update_plugins' ) )
|
if ( current_user_can( 'update_plugins' ) )
|
||||||
|
|
Loading…
Reference in New Issue