Need to hide Domain Mapping menu

Because we are setting up our sites on our Cloudflare account to provide universal SSL for the domain mapped sites, we do not want our site admins to have the domain mapping menu available in tools.

I had this fixed previously using Admin Menu Pro and User Role Editor plus, but for some reason Domain Mapping is not showing up as an option under either program.

Our site admins have reduced roles and are either Authors, Editors or Editor Plus.

I also realize that I have not updated the Domain Mapping plugin because I had found that there was a conflict with CoursePress Pro on the last update and had to revert to earlier version (which I have been waiting for verification that this is fixed).

I have granted access.

  • Ash
    • WordPress Hacker

    Hello antKat

    Please try the following menu to hide the Domain Mapping menu from subsite:

    add_action( 'admin_menu', 'hide_dm_menu', 999 );
    function hide_dm_menu() {
        if( ! is_network_admin() )
        $page = remove_submenu_page( 'tools.php', 'domainmapping' );
    }

    You can use this code in your theme's functions.php if the theme is not changed. Otherwise mu-plugin is the best option. To create a mu-plugin, go to wp-content/mu-plugins folder. If there is no mu-plugins folder then, create one. Now, inside the mu-plugins folder create file with name anything.php (make sure file extension is .php). Now start with a <?php tag and then put the above code.

    About the domain mapping and coursepress conflict issue, do you have any thread for that? If so, would you please post the link here?

    Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.