Hide "Add Existing User" From Site Admins
Removes the "Add Existing User" form on subsite Users > Add New for site admins, so they cannot pull people from other sites on the network.
Opens WPIDE on
Code
if ( ! is_multisite() ) {
return;
}
add_filter( 'show_network_site_users_add_existing_form', function ( $show ) {
return is_super_admin() ? $show : false;
} );
Notes
Super admins still see the form.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.