diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 516f69f235..1226a9e53e 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -246,7 +246,7 @@ function wp_ajax_autocomplete_user() { wp_die( -1 ); /** This filter is documented in wp-admin/user-new.php */ - if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) + if ( ! current_user_can( 'manage_network_users' ) && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) wp_die( -1 ); $return = array(); diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index e039d711ef..f26d61edd5 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -225,7 +225,7 @@ wp_enqueue_script( 'user-profile' ); * @param bool $enable Whether to enable auto-complete for non-super admins. Default false. */ if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' ) - && ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) ) + && ( current_user_can( 'manage_network_users' ) || apply_filters( 'autocomplete_users_for_site_admins', false ) ) ) { wp_enqueue_script( 'user-suggest' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3641890720..0193e8b8ad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39933'; +$wp_version = '4.8-alpha-39934'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.