When a user with Editor privileges logs in, they are bombarded with notices that they do not and should not care about.
How can I disable all nags for everyone except users with Administrator privileges?
You could remove all actions from the admin_notices
hook. The best way to do that might be from the earliest priority of the hook itself, that way you catch any notices registered late.
add_action(
'admin_notices',
function() {
if ( ! current_user_can( 'manage_options' ) ) {
remove_all_actions( 'admin_notices' );
}
},
0
);
The problem is that there's very little standardisation around admin notices, and there could be plugins that are registering notices in the incorrect way or in the incorrect places. So if any notices aren't caught by that code, you'd need to address them on a case by case basis.