Disable update message for non-admin users

Support General Disable update message for non-admin usersResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29362
    JugiburJugibur
    Participant

    Hi,

    just a tiny suggestion...
    If just an "editor" user is logged in admin area there should be no message about an update for Meta Box, like this:

    There are one or more required or recommended plugins to install, update or activate. Please contact the administrator of this site for help.

    Reason: This message confuses some non-English speaking users and it should be the responsibility of the admin alone.

    Thanks!
    Juergen

    #29378
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can try to use this code to hide the update notice

    add_action('admin_head', function() {
        if(!current_user_can('manage_options')){
            remove_action( 'admin_notices', 'update_nag',      3  );
            remove_action( 'admin_notices', 'maintenance_nag', 10 );
        }
    });

    Follow on this topic https://wordpress.stackexchange.com/questions/231010/remove-update-nags-for-non-admins

    #29379
    JugiburJugibur
    Participant

    Many thanks, Long, I'll give it a try!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.