Created
August 24, 2014 11:24
-
-
Save dipakcg/a7e9fe1a21968863a8e4 to your computer and use it in GitHub Desktop.
WordPress - Display update notification 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
/* Adding this PHP code to the functions.php of WordPress theme will only display WordPress update notifications to admin users. */ | |
global $user_login; | |
get_currentuserinfo(); | |
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