Disable the “please update now” message on the WordPress dashboard for non-administrators

Sometimes when other people like clients need to use the admin section of your wordpress you don’t always want them to be able to update to a newer version of wordpress because this can lead to problems with plugins. I you only want administrators to see the update message, add this code to your theme’s functions.php files:

// Disable update message for non-administrators
if ( !current_user_can( 'edit_users' ) ) {
  add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) ); 
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s