- Timestamp:
- 04/05/2017 10:24:24 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r40106 r40378 222 222 'search' => 'search', 223 223 'roles' => 'role__in', 224 'slug' => 'nicename__in', 224 225 ); 225 226 … … 262 263 $prepared_args['search'] = '*' . $prepared_args['search'] . '*'; 263 264 } 264 265 if ( isset( $registered['slug'] ) && ! empty( $request['slug'] ) ) {266 $prepared_args['search'] = $request['slug'];267 $prepared_args['search_columns'] = array( 'user_nicename' );268 }269 270 265 /** 271 266 * Filters WP_User_Query arguments when querying users via the REST API. … … 1364 1359 1365 1360 $query_params['slug'] = array( 1366 'description' => __( 'Limit result set to users with a specific slug.' ), 1367 'type' => 'string', 1361 'description' => __( 'Limit result set to users with one or more specific slugs.' ), 1362 'type' => 'array', 1363 'items' => array( 1364 'type' => 'string', 1365 ), 1368 1366 ); 1369 1367
Note: See TracChangeset
for help on using the changeset viewer.