Ticket #16622: 16622.2.diff
File 16622.2.diff, 1.8 KB (added by , 14 years ago) |
---|
-
wp-includes/query.php
1231 1231 var $is_post_type_archive = false; 1232 1232 1233 1233 /** 1234 * Whether the tax query has been parsed once. 1234 * Stores the ->query_vars state like md5( serialize( $this->query_vars ) ) so we know 1235 * whether we have to re-parse because something has changed. 1235 1236 * 1236 1237 * @since 3.1.0 1237 1238 * @access private 1238 * @var bool1239 1239 */ 1240 var $ parsed_tax_query= false;1240 var $query_vars_hash = false; 1241 1241 1242 1242 /** 1243 1243 * Resets query flags to false. … … 1496 1496 $this->is_date = true; 1497 1497 } 1498 1498 1499 $this-> parsed_tax_query= false;1499 $this->query_vars_hash = false; 1500 1500 $this->parse_tax_query( $qv ); 1501 1501 1502 1502 foreach ( $this->tax_query->queries as $tax_query ) { … … 1681 1681 } 1682 1682 } 1683 1683 1684 $query_vars_hash = md5( serialize( $this->query_vars ) ); 1685 1684 1686 // Category stuff 1685 if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && !$this->parsed_tax_query) {1687 if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && $query_vars_hash != $this->query_vars_hash ) { 1686 1688 $q['cat'] = ''.urldecode($q['cat']).''; 1687 1689 $q['cat'] = addslashes_gpc($q['cat']); 1688 1690 $cat_array = preg_split('/[,\s]+/', $q['cat']); … … 1736 1738 } 1737 1739 1738 1740 // Tag stuff 1739 if ( '' != $q['tag'] && !$this->is_singular && !$this->parsed_tax_query) {1741 if ( '' != $q['tag'] && !$this->is_singular && $query_vars_hash != $this->query_vars_hash ) { 1740 1742 if ( strpos($q['tag'], ',') !== false ) { 1741 1743 $tags = preg_split('/[,\s]+/', $q['tag']); 1742 1744 foreach ( (array) $tags as $tag ) { … … 1808 1810 ); 1809 1811 } 1810 1812 1811 $this-> parsed_tax_query = true;1813 $this->query_vars_hash = $query_vars_hash; 1812 1814 1813 1815 $this->tax_query = new WP_Tax_Query( $tax_query ); 1814 1816 }