Display update notification for admins

WordPress Tutorial – Adding this PHP code to the functions.php of your 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;" ) );
}

Be Sociable, Share!

Leave a comment