Skip to content

Instantly share code, notes, and snippets.

@sjaved87
Last active January 5, 2017 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjaved87/77b405fae0424765fc4bd7fed3cf0088 to your computer and use it in GitHub Desktop.
Save sjaved87/77b405fae0424765fc4bd7fed3cf0088 to your computer and use it in GitHub Desktop.
[WPMU DEV Domain Mapping plugin] This snippet will remove the Domain Mapping menu under Tools from all sites unless its Super Admin who is viewing the site.
<?php
add_action( 'admin_menu', 'wpmudev_hide_domain_mapping_menu', 999 );
function wpmudev_hide_domain_mapping_menu() {
if( is_super_admin() ) return;
$page = remove_submenu_page( 'tools.php', 'domainmapping' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment