Fix attachment queries. fixes #2041
git-svn-id: https://develop.svn.wordpress.org/trunk@3293 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
baeac0c8ee
commit
2907e6aade
@ -631,7 +631,7 @@ class WP_Query {
|
||||
// Check post status to determine if post should be displayed.
|
||||
if ($this->is_single) {
|
||||
$status = get_post_status($this->posts[0]);
|
||||
if ('publish' != $status) {
|
||||
if ( ('publish' != $status) && ('static' != $status) ) {
|
||||
if ( ! (isset($user_ID) && ('' != intval($user_ID))) ) {
|
||||
// User must be logged in to view unpublished posts.
|
||||
$this->posts = array();
|
||||
|
Loading…
Reference in New Issue
Block a user