Use correct capabilities checks when determining whether to show private posts. Props molecularbear. fixes #3827
git-svn-id: http://svn.automattic.com/wordpress/trunk@4940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
92afb1e407
commit
5fde2708cf
|
@ -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'";
|
||||
|
|
Loading…
Reference in New Issue