Loading...
Home Picture
Code

Function to Change Hide Update Message from Users

Scroll Down

/**
* code #11 - remove WordPress update message for everyone except Admin users
* source - http://wordpress.stackexchange.com/a/1585/8922
*/
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;"));
}

This code will only display the WordPress update message to Administrators of the website. It is almost pointless for authors or editors to see this information because they do not usually have the ability to update the website. Only administrators would have this ability, and so this code snippet will keep your backend running a little more smoothly.