From 9d797cfdad7177a25277914911c10c45e409dad7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 23 Sep 2005 23:24:19 +0000 Subject: [PATCH] Add object awareness to WP_Query. Props skeltoac. fixes #1700 git-svn-id: https://develop.svn.wordpress.org/trunk@2908 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 46948bac7c..fbb57fd80b 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);