Fix attachment queries. fixes #2041
git-svn-id: http://svn.automattic.com/wordpress/trunk@3293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d75e305a2
commit
2a4aafe9b9
|
@ -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