Well, Wordpress 2.3.1 is out and if you’re anything like me, you still haven’t upgraded..
I know it was just released yesterday but for those of you who had already upgraded to WP2.3 within the last few weeks, you may have noticed the AWESOME NEW UPDATE NAG that appears in the back-end of your site !
WP2.3 now lets you know, automatically, as soon as there is a new version released. Then, a yellow nag message appears on every page in the back-end, saying: “A new version of WordPress is available! Please update now”. All very cool and useful, especially if you’ve gone and customized the Dashboard (with plugins or otherwise) so that you don’t see the headlines coming from WP.

My problem, as a site administrator, was that a yellow message also pops up for all my users. It says: “A new version of WordPress is available! Please notify the site administrator”. Now, some might not have a problem with this (and for most of my sites this won’t really be a problem) but for sites like indyish.com that have a lot of users, i personally wouldn’t want all of them notifying me of this. In fact, i probably don’t even want them seeing this notice at all.
So, all that to say.. i wrote a simple plugin that disables this notice for all - except - the site Administrator.
This is the basic function i used:
(copy/pasting this code directly is sometimes problematic, so unless you know what you are doing i suggest downloading the plugin file instead. See Below.)
function stop_wpupdate() {
$cur = get_option( ‘update_core’ );
if ( ! isset( $cur->response ) || $cur->response != ‘upgrade’ )
return false;
if ( current_user_can(‘manage_options’) )
return false;
else
remove_action( ‘admin_notices’, ‘update_nag’, 3 );
echo “<div id=’update-nag’>$msg</div>”;
}
add_action( ‘admin_notices’, ’stop_wpupdate’, 1 );
?>
» Or, you can just download the plugin file here and upload/activate it on your site.
[Note: This plugin requires WordPress 2.3 or above.]
Enjoy!
Comments 2
Great plugin :). I just noticed this message myself. I have no idea why WP would have this display to non admins. Completely pointless, an admin knows whether they’re going to update to a newer WP or not. Anyway, cheers! Thought I was going to have to edit the code myself (cue 10 hours of random file editing, not exactly knowing exactly what I’m changing but just crossing my fingers and hoping for the best :p)
Posted 02 Jan 2008 at 6:28 pm ¶hey thanks,
i was hoping the plugin might be a little time-saver for admins!
Posted 02 Jan 2008 at 11:51 pm ¶Post a Comment