Changeset 17452
- Timestamp:
- 02/15/2011 11:58:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-includes/query.php
r17436 r17452 1313 1313 */ 1314 1314 function parse_query_vars() { 1315 $this->parse_query( '');1315 $this->parse_query(); 1316 1316 } 1317 1317 … … 1384 1384 * @access public 1385 1385 * 1386 * @param string|array $query 1387 */ 1388 function parse_query( $query) {1389 if ( ! empty($query) || !isset($this->query) ) {1386 * @param string|array $query Optional query. 1387 */ 1388 function parse_query( $query = '' ) { 1389 if ( ! empty( $query ) ) { 1390 1390 $this->init(); 1391 $this->query = $this->query_vars = wp_parse_args($query); 1391 $this->query = $this->query_vars = wp_parse_args( $query ); 1392 } elseif ( ! isset( $this->query ) ) { 1393 $this->query = $this->query_vars; 1392 1394 } 1393 1395 … … 1871 1873 function &get_posts() { 1872 1874 global $wpdb, $user_ID, $_wp_using_ext_object_cache; 1875 1876 $this->parse_query(); 1873 1877 1874 1878 do_action_ref_array('pre_get_posts', array(&$this)); … … 2852 2856 * @return array List of posts. 2853 2857 */ 2854 function &query($query) { 2855 $this->parse_query($query); 2858 function &query( $query ) { 2859 $this->init(); 2860 $this->query = $this->query_vars = wp_parse_args( $query ); 2856 2861 return $this->get_posts(); 2857 2862 }
Note: See TracChangeset
for help on using the changeset viewer.