diff --git a/src/wp-admin/network/site-users.php b/src/wp-admin/network/site-users.php index 62c6212c3f..9501112c21 100644 --- a/src/wp-admin/network/site-users.php +++ b/src/wp-admin/network/site-users.php @@ -164,6 +164,13 @@ $title = sprintf( __('Edit Site: %s'), $site_url_no_http ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; +/** + * Filter whether to show the Add Existing User form on the Multisite Users screen. + * + * @since 3.1.0 + * + * @param bool $bool Whether to show the Add Existing User form. Default true. + */ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) wp_enqueue_script( 'user-suggest' ); @@ -243,9 +250,16 @@ endif; ?> - + +/** This filter is documented in wp-admin/network/site-users.php */ +if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>

@@ -272,7 +286,15 @@ endif; ?>
- +