Use ->query instead of . Always kick off the parse_query action. fixes #16545 for 3.1

git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-02-16 16:27:03 +00:00
parent 7e22be1283
commit 4425fc362e
1 changed files with 2 additions and 3 deletions

View File

@ -1570,7 +1570,7 @@ class WP_Query {
// Correct is_* for page_on_front and page_for_posts // Correct is_* for page_on_front and page_for_posts
if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) { if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
$_query = wp_parse_args($query); $_query = wp_parse_args($this->query);
// pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename. // pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
if ( isset($_query['pagename']) && '' == $_query['pagename'] ) if ( isset($_query['pagename']) && '' == $_query['pagename'] )
unset($_query['pagename']); unset($_query['pagename']);
@ -1627,7 +1627,6 @@ class WP_Query {
if ( '404' == $qv['error'] ) if ( '404' == $qv['error'] )
$this->set_404(); $this->set_404();
if ( !empty($query) )
do_action_ref_array('parse_query', array(&$this)); do_action_ref_array('parse_query', array(&$this));
} }