Add trash to edit cap check.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-02-13 19:05:10 +00:00
parent 976c058970
commit 9316d29c1d
1 changed files with 1 additions and 1 deletions

View File

@ -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();