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:
parent
976c058970
commit
9316d29c1d
|
@ -2302,7 +2302,7 @@ class WP_Query {
|
||||||
// User must be logged in to view unpublished posts.
|
// User must be logged in to view unpublished posts.
|
||||||
$this->posts = array();
|
$this->posts = array();
|
||||||
} else {
|
} 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.
|
// User must have edit permissions on the draft to preview.
|
||||||
if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) {
|
if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) {
|
||||||
$this->posts = array();
|
$this->posts = array();
|
||||||
|
|
Loading…
Reference in New Issue