Changeset 40426 for branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
- Timestamp:
- 04/14/2017 08:46:22 AM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r40111 r40426 221 221 'search' => 'search', 222 222 'roles' => 'role__in', 223 'slug' => 'nicename__in', 223 224 ); 224 225 … … 261 262 $prepared_args['search'] = '*' . $prepared_args['search'] . '*'; 262 263 } 263 264 if ( isset( $registered['slug'] ) && ! empty( $request['slug'] ) ) {265 $prepared_args['search'] = $request['slug'];266 $prepared_args['search_columns'] = array( 'user_nicename' );267 }268 269 264 /** 270 265 * Filters WP_User_Query arguments when querying users via the REST API. … … 1362 1357 $query_params['slug'] = array( 1363 1358 'description' => __( 'Limit result set to users with a specific slug.' ), 1364 'type' => 'string', 1359 'type' => 'array', 1360 'items' => array( 1361 'type' => 'string', 1362 ), 1365 1363 ); 1366 1364
Note: See TracChangeset
for help on using the changeset viewer.