Disable Non-admins from Seeing the WP Version Update Notification

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.

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 );
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!


Tags: ,

3 Responses to Disable Non-admins from Seeing the WP Version Update Notification

  1. Flinn

    thnx a lot JM ,now I’ll be able to take some air in to my lungs……..my client came back to visit his sites dashboard after a couple of months ,n u wont believe me I had a tough time trying to explain him how things work.

  2. Pingback: Disable the Wordpress Upgrade Nag

  3. deka

    thanks a lot bro…
    this is what I need ..
    i’m looking for it everywhere..

Leave a Reply

Your email is never published nor shared. Required fields are marked *

  • You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Login to your Account

I forgot my password.