Introduction
When you share a WordPress environment with contributors, subscribers, authors or any other role that a user may inherit, you would not only want to remove certain rights, such as administrator rights or simplify the user interface, but also to remove all information about WordPress updates or plugins that pollute without really being useful to them.
Make it simple…without plugin
This can be done with plugins like White Label CMS. Now, if it’s just a matter of removing the update info, it might be better to do it with a few lines of code in PHP.
My method is as follows
// hide update notifications
function remove_core_updates() {
global $wp_version;
return(object) array(
'last_checked'=> time(),
'version_checked'=> $wp_version
);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
These few lines of code allow you to remove the last update check as well as the latest version of WordPress.
We apply this code to 3 filters, the WordPress core update, the plugins update and the themes update.
Of course, you can display the information only for the administrator by filtering roles.
if (current_user_can('administrator') {
code...
}