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
|
b
|
class WP_REST_Posts_Controller extends WP_REST_Controller { |
2291 | 2291 | |
2292 | 2292 | $post_type_obj = get_post_type_object( $this->post_type ); |
2293 | 2293 | |
2294 | | if ( current_user_can( $post_type_obj->cap->edit_posts ) ) { |
| 2294 | if ( current_user_can( $post_type_obj->cap->edit_posts ) || current_user_can( $post_type_obj->cap->read_private_posts ) ) { |
2295 | 2295 | $result = rest_validate_request_arg( $status, $request, $parameter ); |
2296 | 2296 | if ( is_wp_error( $result ) ) { |
2297 | 2297 | return $result; |