Created
February 28, 2013 09:45
-
-
Save chuckreynolds/5055553 to your computer and use it in GitHub Desktop.
Remove WordPress Update Notifications Except for Admins
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
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