mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 07:07:38 +02:00
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
This commit is contained in:
parent
cc3a803930
commit
31fd52fa5c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user