mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Add trash to edit cap check.
git-svn-id: https://develop.svn.wordpress.org/trunk@13118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b39f3fd7f5
commit
a7c3d02452
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user