Update to use cap API.
git-svn-id: https://develop.svn.wordpress.org/trunk@3095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
77fe382c33
commit
1228f9e554
|
@ -619,7 +619,7 @@ class WP_Query {
|
|||
} else {
|
||||
if ('draft' == $status) {
|
||||
// User must have edit permissions on the draft to preview.
|
||||
if (! user_can_edit_post($user_ID, $this->posts[0]->ID)) {
|
||||
if (! current_user_can('edit_post', $this->posts[0]->ID)) {
|
||||
$this->posts = array();
|
||||
} else {
|
||||
$this->is_preview = true;
|
||||
|
|
Loading…
Reference in New Issue