More consistent right-now/footer messages related to version and upgrades in multisite. propx SergeyBiryukov. fixes #15545
git-svn-id: http://svn.automattic.com/wordpress/trunk@18843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ed4c502e16
commit
f1a1d07a13
|
@ -82,9 +82,6 @@ function find_core_update( $version, $locale ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function core_update_footer( $msg = '' ) {
|
function core_update_footer( $msg = '' ) {
|
||||||
if ( is_multisite() && !current_user_can('update_core') )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( !current_user_can('update_core') )
|
if ( !current_user_can('update_core') )
|
||||||
return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] );
|
return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] );
|
||||||
|
|
||||||
|
@ -140,15 +137,13 @@ add_action( 'admin_notices', 'update_nag', 3 );
|
||||||
|
|
||||||
// Called directly from dashboard
|
// Called directly from dashboard
|
||||||
function update_right_now_message() {
|
function update_right_now_message() {
|
||||||
if ( is_multisite() && !current_user_can('update_core') )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
$cur = get_preferred_from_update_core();
|
|
||||||
|
|
||||||
$msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] );
|
$msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] );
|
||||||
|
|
||||||
if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) {
|
if ( current_user_can('update_core') ) {
|
||||||
$msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
|
$cur = get_preferred_from_update_core();
|
||||||
|
|
||||||
|
if ( isset( $cur->response ) && $cur->response == 'upgrade' )
|
||||||
|
$msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<span id='wp-version-message'>$msg</span>";
|
echo "<span id='wp-version-message'>$msg</span>";
|
||||||
|
|
Loading…
Reference in New Issue