Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

Remove Update Notification for all users except Admin


1
2
3
4
5
6
7
// REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN
global $user_login;
get_currentuserinfo();
if (!current_user_can('update_plugins')) { // checks to see if current user can update plugins
    add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
    add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog