diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index c762ed41d7..63fb4e9e99 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -221,6 +221,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { 'per_page' => 'number', 'search' => 'search', 'roles' => 'role__in', + 'slug' => 'nicename__in', ); $prepared_args = array(); @@ -261,12 +262,6 @@ class WP_REST_Users_Controller extends WP_REST_Controller { if ( ! empty( $prepared_args['search'] ) ) { $prepared_args['search'] = '*' . $prepared_args['search'] . '*'; } - - if ( isset( $registered['slug'] ) && ! empty( $request['slug'] ) ) { - $prepared_args['search'] = $request['slug']; - $prepared_args['search_columns'] = array( 'user_nicename' ); - } - /** * Filters WP_User_Query arguments when querying users via the REST API. * @@ -1363,8 +1358,11 @@ class WP_REST_Users_Controller extends WP_REST_Controller { ); $query_params['slug'] = array( - 'description' => __( 'Limit result set to users with a specific slug.' ), - 'type' => 'string', + 'description' => __( 'Limit result set to users with one or more specific slugs.' ), + 'type' => 'array', + 'items' => array( + 'type' => 'string', + ), ); $query_params['roles'] = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 9214f21257..efb487c8de 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40377'; +$wp_version = '4.8-alpha-40378'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.