From c57fadc2766dd98e970ea453ea764cb3f9db9b9e Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Thu, 2 Jan 2020 08:38:41 -0700
Subject: [PATCH] REST API: minor performance improvement for
/wp/v2/users?who=authors.
---
.../rest-api/endpoints/class-wp-rest-users-controller.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
index a83a91b640..cd7592038a 100644
a
|
b
|
class WP_REST_Users_Controller extends WP_REST_Controller { |
205 | 205 | if ( post_type_supports( $type->name, 'author' ) |
206 | 206 | && current_user_can( $type->cap->edit_posts ) ) { |
207 | 207 | $can_view = true; |
| 208 | |
| 209 | break; |
208 | 210 | } |
209 | 211 | } |
210 | 212 | if ( ! $can_view ) { |