Created
December 21, 2013 17:23
-
-
Save dannyconnolly/8072306 to your computer and use it in GitHub Desktop.
REMOVE THE WORDPRESS UPDATE NOTIFICATION FOR ALL USERS EXCEPT SYSADMIN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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