From 2a4aafe9b980c97d520169b245398bc3bc0f65f5 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 12 Dec 2005 01:33:46 +0000 Subject: [PATCH] Fix attachment queries. fixes #2041 git-svn-id: http://svn.automattic.com/wordpress/trunk@3293 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index e8bf921df..c9f13a298 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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();