<?php
// As of WordPress 4.8 the use of is_super_admin is discouraged. Use the setup_network capability check instead.
if ( current_user_can( 'setup_network' ) ) {
// do something
}
?>
<?php
// Removes the "Edit" menu for users who are not Super Admins of a multisite network
if ( ! is_super_admin() ) {
add_action( 'admin_init', 'wpdocs_remove_edit_menu' );
}
/**
* Remove the profile editing link for non-super admins.
*/
function wpdocs_remove_edit_menu() {
remove_menu_page('edit.php');
}
?>
Example