Sometimes you find messages like “WordPress 4.1.1 is available! Please update now.“, in italian it is: “È disponibile WordPress 4.1.1! Aggiorna adesso“. Or another message for users with no permissions “WordPress 4.1.1 is available! Please notify the site administrator“.
To stop those annoying messages for users that don’t need them, you can simply add this code at the end of yout functions.php
file.
It checks that the connected user has no permission to install plugins, so it doesn’t need those advice:
1 2 3 4 | if ( !current_user_can( 'install_plugins' ) ) { add_action( 'admin_menu' , 'hide_nag_messages' ); function hide_nag_messages() { remove_action( 'admin_notices' , 'update_nag' , 3 );} } |