WordPress.org

Forums

Acunetix WP Security
[resolved] Hide WP Security Dashboard menu from other multisite users (3 posts)

  1. KathyW
    Member
    Posted 1 year ago #

    Is it possible to hide the WP Security Dashboard menu from Multi-site admin users (but not super admin). I am trying to simplify my Multi-site back end for users and remove unnecessary (confusing) Dashboard menu items (amongst other things).

    http://wordpress.org/plugins/wp-security-scan/

  2. Acunetix
    Member
    Plugin Author

    Posted 1 year ago #

    Hello, Kathy

    For the moment, this is not possible becasue there is no configurable option implemented yet.

    We might implement it in one of the future versions though.

    Regards,
    Costin

  3. BookClubReader
    Member
    Posted 8 months ago #

    Hi Kathy,

    Create an mu plugin with the following code

    <?php
    
    function hide_dashboard_menu () {
    
    if ( !is_main_site($blog_id) ) {
    
    echo '<style type="text/css">
    #toplevel_page_wps_ {
    display:none;
    }
    </style>';
    }
    
    }
    
    add_filter('admin_head', 'hide_dashboard_menu');
    
    ?>

    This code checks to see if the site is a subsite. If it is, then it will add the css code into the admin header section to remove the menu item.

    Not sure how to create an mu plugin? Create the following folder /wp-content/mu-plugins. Then, create a new file in the folder (e.g. /wp-content/mu-plugins/hide-plugin.php). Paste the code above into the file and save. This will remove the menu item from all subsites.

    Best of luck!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Acunetix WP Security
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic