Use correct capabilities checks when determining whether to show private posts. Props molecularbear. fixes #3827

git-svn-id: https://develop.svn.wordpress.org/trunk@4940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-02-25 13:39:34 +00:00
parent f8e2216f0e
commit 11d28a5c07
1 changed files with 2 additions and 2 deletions

View File

@ -966,9 +966,9 @@ class WP_Query {
if ( is_user_logged_in() ) {
if ( 'post' == $post_type )
$cap = 'edit_private_posts';
$cap = 'read_private_posts';
else
$cap = 'edit_private_pages';
$cap = 'read_private_pages';
if ( current_user_can($cap) )
$where .= " OR post_status = 'private'";