One of the many, many reasons I love WordPress is that it lets you know when a newer version is up for grabs and is only a couple of clicks away. That’s sweet, but sometimes I feel annoyed when a client calls me in a busy mid-week day and tells me that I should update their website.

WordPress Update Nag
The following snippet lets only the administrators know the fact that there is a newer version of WordPress. Copy and pate the code below into your active theme’s functions.php.
function hide_update_notice() {
if ( !current_user_can( 'edit_users' ) ) :
remove_action( 'admin_notices', 'update_nag', 3 );
endif;
}
add_action( 'admin_notices', 'hide_update_notice', 1 );
This will check if the current user can edit other users’ profiles, if it returns true, then the user is administrator and the update nag will be shown, but if the currently logged in user cannot edit the other people’s profiles it will not bother notifying them any WordPress version updates.
Have a great day and happy new year!
The bottom line
This entry was posted 2 months, 1 week ago on Tuesday, January 5th, 2010 at 11:44 am and is filed under WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Hello, this is 






