From d96a87866d37912100ac27e6c55bc1a13b0eab4a Mon Sep 17 00:00:00 2001
From: Leon Francis Shelhamer <leon@211j.com>
Date: Thu, 5 Apr 2018 12:16:18 -0400
Subject: [PATCH] =?UTF-8?q?Make=20the=20"read=5Fprivate=E2=80=9D=20cap=20a?=
 =?UTF-8?q?ccessible=20over=20the=20REST=20API?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Leon Francis Shelhamer <leon@211j.com>
---
 wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index 0661152de6..80c0f8d4d2 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
@@ -2291,7 +2291,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 
 			$post_type_obj = get_post_type_object( $this->post_type );
 
-			if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
+			if ( current_user_can( $post_type_obj->cap->edit_posts ) || current_user_can( $post_type_obj->cap->read_private_posts ) ) {
 				$result = rest_validate_request_arg( $status, $request, $parameter );
 				if ( is_wp_error( $result ) ) {
 					return $result;
-- 
2.13.5 (Apple Git-94)

