Do thorough resets in init() and init_query_flags(). Props coffee2code. Fixes #14976
git-svn-id: https://develop.svn.wordpress.org/trunk@15672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
733af07765
commit
898ba9b2b2
@ -996,6 +996,15 @@ class WP_Query {
|
|||||||
*/
|
*/
|
||||||
var $is_comments_popup = false;
|
var $is_comments_popup = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if query is paged
|
||||||
|
*
|
||||||
|
* @since 1.5.0
|
||||||
|
* @access public
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
var $is_paged = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set if query is part of administration page.
|
* Set if query is part of administration page.
|
||||||
*
|
*
|
||||||
@ -1053,6 +1062,7 @@ class WP_Query {
|
|||||||
*/
|
*/
|
||||||
function init_query_flags() {
|
function init_query_flags() {
|
||||||
$this->is_single = false;
|
$this->is_single = false;
|
||||||
|
$this->is_preview = false;
|
||||||
$this->is_page = false;
|
$this->is_page = false;
|
||||||
$this->is_archive = false;
|
$this->is_archive = false;
|
||||||
$this->is_date = false;
|
$this->is_date = false;
|
||||||
@ -1070,6 +1080,7 @@ class WP_Query {
|
|||||||
$this->is_trackback = false;
|
$this->is_trackback = false;
|
||||||
$this->is_home = false;
|
$this->is_home = false;
|
||||||
$this->is_404 = false;
|
$this->is_404 = false;
|
||||||
|
$this->is_comments_popup = false;
|
||||||
$this->is_paged = false;
|
$this->is_paged = false;
|
||||||
$this->is_admin = false;
|
$this->is_admin = false;
|
||||||
$this->is_attachment = false;
|
$this->is_attachment = false;
|
||||||
@ -1088,11 +1099,22 @@ class WP_Query {
|
|||||||
unset($this->posts);
|
unset($this->posts);
|
||||||
unset($this->query);
|
unset($this->query);
|
||||||
$this->query_vars = array();
|
$this->query_vars = array();
|
||||||
|
$this->tax_query = array();
|
||||||
|
$this->meta_query = array();
|
||||||
unset($this->queried_object);
|
unset($this->queried_object);
|
||||||
unset($this->queried_object_id);
|
unset($this->queried_object_id);
|
||||||
$this->post_count = 0;
|
$this->post_count = 0;
|
||||||
$this->current_post = -1;
|
$this->current_post = -1;
|
||||||
$this->in_the_loop = false;
|
$this->in_the_loop = false;
|
||||||
|
unset( $this->request );
|
||||||
|
unset( $this->post );
|
||||||
|
unset( $this->comments );
|
||||||
|
unset( $this->comment );
|
||||||
|
$this->comment_count = 0;
|
||||||
|
$this->current_comment = -1;
|
||||||
|
$this->found_posts = 0;
|
||||||
|
$this->max_num_pages = 0;
|
||||||
|
$this->max_num_comment_pages = 0;
|
||||||
|
|
||||||
$this->init_query_flags();
|
$this->init_query_flags();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user