From a7c3d02452cf1e4d9fedba666d79d54cf47cdfbb Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 13 Feb 2010 19:05:10 +0000 Subject: [PATCH] Add trash to edit cap check. git-svn-id: https://develop.svn.wordpress.org/trunk@13118 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index b19621b99c..2628e3c869 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2302,7 +2302,7 @@ class WP_Query { // User must be logged in to view unpublished posts. $this->posts = array(); } else { - if (in_array($status, array('draft', 'pending')) ) { + if (in_array($status, array('draft', 'pending', 'trash')) ) { // User must have edit permissions on the draft to preview. if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) { $this->posts = array();