mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Add a is_user_logged_in() check.
git-svn-id: https://develop.svn.wordpress.org/trunk@5579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1024,8 +1024,10 @@ class WP_Query {
|
||||
|
||||
if ( is_admin() )
|
||||
$where .= " OR post_status = 'future' OR post_status = 'draft'";
|
||||
|
||||
$where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'";
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
$where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'";
|
||||
}
|
||||
|
||||
$where .= ')';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user