Bring network admin user searching to parity with single site user searching by wrapping search terms in asterisks. This means that searches don't require an exact match and therefore significantly reduces friction when searching for users on the network admin screens.
Fixes #32913 git-svn-id: https://develop.svn.wordpress.org/trunk@33801 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7b9f6f54bf
commit
a4808224ff
|
@ -42,8 +42,12 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
|||
'fields' => 'all_with_meta'
|
||||
);
|
||||
|
||||
if ( wp_is_large_network( 'users' ) )
|
||||
if ( wp_is_large_network( 'users' ) ) {
|
||||
$args['search'] = ltrim( $args['search'], '*' );
|
||||
} else if ( '' !== $args['search'] ) {
|
||||
$args['search'] = trim( $args['search'], '*' );
|
||||
$args['search'] = '*' . $args['search'] . '*';
|
||||
}
|
||||
|
||||
if ( $role == 'super' ) {
|
||||
$logins = implode( "', '", get_super_admins() );
|
||||
|
|
Loading…
Reference in New Issue