mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user