- Timestamp:
- 11/09/2021 02:15:23 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r51943 r52069 312 312 } 313 313 314 if ( ! empty( $request['has_published_posts'] ) ) { 315 $prepared_args['has_published_posts'] = ( true === $request['has_published_posts'] ) 316 ? get_post_types( array( 'show_in_rest' => true ), 'names' ) 317 : (array) $request['has_published_posts']; 318 } 319 314 320 if ( ! empty( $prepared_args['search'] ) ) { 315 321 $prepared_args['search'] = '*' . $prepared_args['search'] . '*'; … … 1581 1587 ); 1582 1588 1589 $query_params['has_published_posts'] = array( 1590 'description' => __( 'Limit result set to users who have published posts.' ), 1591 'type' => array( 'boolean', 'array' ), 1592 'items' => array( 1593 'type' => 'string', 1594 'enum' => get_post_types( array( 'show_in_rest' => true ), 'names' ), 1595 ), 1596 ); 1597 1583 1598 /** 1584 1599 * Filters REST API collection parameters for the users controller.
Note: See TracChangeset
for help on using the changeset viewer.