Ticket #16545: 16545-parsed_query-flag.diff
File 16545-parsed_query-flag.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/query.php
1240 1240 var $parsed_tax_query = false; 1241 1241 1242 1242 /** 1243 * Whether the query has been parsed once. 1244 * 1245 * @since 3.1.0 1246 * @access private 1247 * @var bool 1248 */ 1249 var $parsed_query = false; 1250 1251 /** 1243 1252 * Resets query flags to false. 1244 1253 * 1245 1254 * The query flags are what page info WordPress was able to figure out. … … 1625 1634 if ( '404' == $qv['error'] ) 1626 1635 $this->set_404(); 1627 1636 1637 // Mark the query as parsed 1638 $this->parsed_query = true; 1639 1628 1640 if ( !empty($query) ) 1629 1641 do_action_ref_array('parse_query', array(&$this)); 1630 1642 } … … 1871 1883 function &get_posts() { 1872 1884 global $wpdb, $user_ID, $_wp_using_ext_object_cache; 1873 1885 1886 // If we haven't parsed the query already, we should do that now 1887 if ( !$this->parsed_query ) 1888 $this->parse_query( $this->query ); 1889 1890 $this->parsed_query = false; // Reset it 1891 1874 1892 do_action_ref_array('pre_get_posts', array(&$this)); 1875 1893 1876 1894 // Shorthand.