mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Use maybe_network_admin_url. see #15840.
git-svn-id: https://develop.svn.wordpress.org/trunk@16978 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -98,15 +98,13 @@ function core_update_footer( $msg = '' ) {
|
||||
if ( ! isset( $cur->response ) )
|
||||
$cur->response = '';
|
||||
|
||||
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
|
||||
|
||||
switch ( $cur->response ) {
|
||||
case 'development' :
|
||||
return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href );
|
||||
return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], maybe_network_admin_url( 'update-core.php' ) );
|
||||
break;
|
||||
|
||||
case 'upgrade' :
|
||||
return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current);
|
||||
return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', maybe_network_admin_url( 'update-core.php' ), $cur->current);
|
||||
break;
|
||||
|
||||
case 'latest' :
|
||||
@@ -132,8 +130,7 @@ function update_nag() {
|
||||
return false;
|
||||
|
||||
if ( current_user_can('update_core') ) {
|
||||
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
|
||||
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, $href );
|
||||
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, maybe_network_admin_url( 'update-core.php' ) );
|
||||
} else {
|
||||
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
|
||||
}
|
||||
@@ -151,8 +148,7 @@ function update_right_now_message() {
|
||||
$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') ) {
|
||||
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
|
||||
$msg .= " <a href='" . $href . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
|
||||
$msg .= " <a href='" . maybe_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>";
|
||||
|
||||
Reference in New Issue
Block a user