Multisite: Replace `is_super_admin()` with `manage_network_users` when checking for users autocomplete capabilities.
Props ashokkumar24. Fixes #39201. See #37616. Built from https://develop.svn.wordpress.org/trunk@39934 git-svn-id: http://core.svn.wordpress.org/trunk@39871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6e5cd6d397
commit
c22fea9120
|
@ -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();
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue