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:
Ryan Boren 2005-11-16 00:50:02 +00:00
parent 77fe382c33
commit 1228f9e554
1 changed files with 1 additions and 1 deletions

View File

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