From 49f2d1a6527f40f9b641959545d8fe2a5548cfb6 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 30 Aug 2007 18:21:03 +0000 Subject: [PATCH] Check manage_options for upgrade notification. Tailor message accordingly. Props johnbillion. fixes #4869 git-svn-id: https://develop.svn.wordpress.org/trunk@5994 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/update.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 77617815e1..519e5288a8 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -3,6 +3,9 @@ // The admin side of our 1.0 update system function core_update_footer( $msg ) { + if ( !current_user_can('manage_options') ) + return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); + $cur = get_option( 'update_core' ); switch ( $cur->response ) { @@ -23,14 +26,17 @@ function core_update_footer( $msg ) { add_filter( 'update_footer', 'core_update_footer' ); function update_nag() { -$cur = get_option( 'update_core' ); + $cur = get_option( 'update_core' ); -if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) - return false; + if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) + return false; -?> -
Please update now.'), $cur->url ); ?>
-Please update now.'), $cur->url ); + else + $msg = __('A new version of WordPress is available! Please notify the site administrator.'); + + echo "
$msg
"; } add_action( 'admin_notices', 'update_nag', 3 );