mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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:
parent
5b285e0803
commit
bc33fe2e0e
@ -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
Block a user