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 3179ef3419..3e44884a3c 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 @@ -248,7 +248,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { } if ( ! current_user_can( 'list_users' ) ) { - $prepared_args['has_published_posts'] = true; + $prepared_args['has_published_posts'] = get_post_types( array( 'show_in_rest' => true ), 'names' ); } if ( ! empty( $prepared_args['search'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index b16435447d..bf6b94b64d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.1-RC1-39832'; +$wp_version = '4.7.1-RC1-39844'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.