From 6ee45a9606061fecf8a9c8bf286340495d651c12 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 29 Aug 2015 00:19:24 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-ms-users-list-table.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php index b972909e56..251f8ff536 100644 --- a/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/wp-admin/includes/class-wp-ms-users-list-table.php @@ -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() ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 46d26bf7df..3af857865e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.