Hide Core Update Notices From Non-Administrators
Stops the "WordPress x.y is available" banner from showing to users who cannot update WordPress, so editors and authors are not distracted by it.
Opens WPIDE on
Code
add_action( 'admin_head', function () {
if ( current_user_can( 'update_core' ) ) {
return;
}
remove_action( 'admin_notices', 'update_nag', 3 );
remove_action( 'network_admin_notices', 'update_nag', 3 );
}, 1 );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.