Phuket Website Design, Graphic Design, E-Marketing, Printing and more..
+66 (0)76 381 039

Remove “Update Now” Message from WordPress Admin Area

16 April 2012
Website Design, WordPress    , ,

If you’ve worked with WordPress for any length of time, you’ve seen the WordPress update nag.

wordpress update nag

As an administrator, this is a great little alert to remind you to upgrade your WordPress installation to the latest version and take advantage of all the great new features or important fixes that are part of each new edition. But do non-admins really need to see it? Not if they can’t initiate an upgrade by themselves.

To avoid giving your clients sleepless nights over why they aren’t currently using the latest version of WordPress, here’s a little snippet to remove the nag altogether for non-admins. Simply add this to your functions.php file and you’re all set.

// Remove 'Upgrade Now' message for non-admin users
function no_update_nag() {
	remove_action( 'admin_notices', 'update_nag', 3 );
}
if ( !current_user_can( 'edit_users' ) ) {
	add_action( 'admin_init', 'no_update_nag' );
}

Leave a Comment