Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dannyconnolly/8072306 to your computer and use it in GitHub Desktop.
Save dannyconnolly/8072306 to your computer and use it in GitHub Desktop.
REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN
// 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;" ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment