Support » Plugin: Admin and Site Enhancements » Hide news from non-admins + add .role in bodyclass

  • Resolved ofmarconi

    (@ofmarconi)


    Even centralized in a Modal, it’s still a distraction in the backend for editor, it’s possible via CSS:

    li#wp-admin-bar-asenha-hide-admin-notices {
        display: none;
    }

    But this hides it for the Administrator too, which makes me think of a new suggestion, which is the option to add the ROLE as Body.Class, so I could finely customize the interface for Editors, Subscribers…

    body:not(.superadmin) li#wp-admin-bar-asenha-hide-admin-notices {
        display: none;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bowo

    (@qriouslad)

    @ofmarconi thank you for the suggestion. I don’t think completely hiding all notices for non-admins makes sense. e.g. some of the notices are related to post editing activities, which is needed for non-admins. So, maybe adding the role-slug to the body class list may be more useful/flexible, at least for your use case.

    Thread Starter ofmarconi

    (@ofmarconi)

    Yes!

    I totally agree, then everyone can adapt as they wish and it also streamlines its support for this type of customization, it would not be necessary to develop the solution, just add this snippet.

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