X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/596d585e1dc1eb25bccd3781e37210a4e2504179..6c8f14c09105d0afa4c1574215c59b5021040e76:/wp-admin/includes/update.php diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index e02d4de2..5cca9dca 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -83,9 +83,12 @@ function find_core_update( $version, $locale ) { function core_update_footer( $msg = '' ) { if ( !current_user_can('update_core') ) - return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); + return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); $cur = get_preferred_from_update_core(); + if ( ! is_object( $cur ) ) + $cur = new stdClass; + if ( ! isset( $cur->current ) ) $cur->current = ''; @@ -97,7 +100,7 @@ function core_update_footer( $msg = '' ) { switch ( $cur->response ) { case 'development' : - return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], network_admin_url( 'update-core.php' ) ); + return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) ); break; case 'upgrade' : @@ -106,7 +109,7 @@ function core_update_footer( $msg = '' ) { case 'latest' : default : - return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); + return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); break; } } @@ -134,10 +137,11 @@ function update_nag() { echo "
$msg
"; } add_action( 'admin_notices', 'update_nag', 3 ); +add_action( 'network_admin_notices', 'update_nag', 3 ); // Called directly from dashboard function update_right_now_message() { - $msg = sprintf( __('You are using WordPress %s.'), $GLOBALS['wp_version'] ); + $msg = sprintf( __( 'You are using WordPress %s.' ), get_bloginfo( 'version', 'display' ) ); if ( current_user_can('update_core') ) { $cur = get_preferred_from_update_core();