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

Built from https://develop.svn.wordpress.org/trunk@33801


git-svn-id: http://core.svn.wordpress.org/trunk@33769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2015-08-29 00:19:24 +00:00
parent 0764191402
commit 6ee45a9606
2 changed files with 6 additions and 2 deletions

View File

@ -42,8 +42,12 @@ class WP_MS_Users_List_Table extends WP_List_Table {
'fields' => 'all_with_meta' 'fields' => 'all_with_meta'
); );
if ( wp_is_large_network( 'users' ) ) if ( wp_is_large_network( 'users' ) ) {
$args['search'] = ltrim( $args['search'], '*' ); $args['search'] = ltrim( $args['search'], '*' );
} else if ( '' !== $args['search'] ) {
$args['search'] = trim( $args['search'], '*' );
$args['search'] = '*' . $args['search'] . '*';
}
if ( $role == 'super' ) { if ( $role == 'super' ) {
$logins = implode( "', '", get_super_admins() ); $logins = implode( "', '", get_super_admins() );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-33800'; $wp_version = '4.4-alpha-33801';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.