WordPress most popular and widely used CMS which comes with lots of unlimited features. The best thing about WordPress is that it comes with lots of free plugins and themes. Time-to-time upgraded versions are available and you will be notified in wp-admin panel. If you are running a multi-author WordPress blog, then its necessary to hide the upgraded versions from all users. In this post I’m sharing a piece of code which allows you to hide the updated versions form all users and only administrator can see these notifications.
// 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;” ) );
}
Isn’t it great to hide the notification from other users? Like this post, then do not forge to follow WebGuide4U on Twitter for more updates on WordPress Tips.
[via] StackExchange
Leave a Reply