Update to use cap API.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0170736e28
commit
72c031e0a5
|
@ -619,7 +619,7 @@ class WP_Query {
|
||||||
} else {
|
} else {
|
||||||
if ('draft' == $status) {
|
if ('draft' == $status) {
|
||||||
// User must have edit permissions on the draft to preview.
|
// 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();
|
$this->posts = array();
|
||||||
} else {
|
} else {
|
||||||
$this->is_preview = true;
|
$this->is_preview = true;
|
||||||
|
|
Loading…
Reference in New Issue