From 31fd52fa5c1da38f3393c7db7c457efc69a1da18 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 23 Sep 2005 23:24:19 +0000 Subject: [PATCH] Add object awareness to WP_Query. Props skeltoac. fixes #1700 git-svn-id: http://svn.automattic.com/wordpress/trunk@2908 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 46948bac7..fbb57fd80 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -29,6 +29,7 @@ class WP_Query { var $is_404 = false; var $is_comments_popup = false; var $is_admin = false; + var $is_object = false; function init_query_flags() { $this->is_single = false; @@ -48,6 +49,7 @@ class WP_Query { $this->is_404 = false; $this->is_paged = false; $this->is_admin = false; + $this->is_object = false; } function init () { @@ -525,6 +527,9 @@ class WP_Query { $where .= ')'; } + if (! $this->is_object ) + $where .= ' AND post_status != "object"'; + // Apply filters on where and join prior to paging so that any // manipulations to them are reflected in the paging by day queries. $where = apply_filters('posts_where', $where);