Changeset 45590 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 07/02/2019 11:41:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r45377 r45590 732 732 if ( ! empty( $query ) ) { 733 733 $this->init(); 734 $this->query = $this->query_vars = wp_parse_args( $query ); 734 $this->query = wp_parse_args( $query ); 735 $this->query_vars = $this->query; 735 736 } elseif ( ! isset( $this->query ) ) { 736 737 $this->query = $this->query_vars; … … 1141 1142 // Category stuff 1142 1143 if ( ! empty( $q['cat'] ) && ! $this->is_singular ) { 1143 $cat_in = $cat_not_in = array(); 1144 $cat_in = array(); 1145 $cat_not_in = array(); 1144 1146 1145 1147 $cat_array = preg_split( '/[,\s]+/', urldecode( $q['cat'] ) ); … … 2035 2037 if ( is_object( $reqpage_obj ) && 'attachment' == $reqpage_obj->post_type ) { 2036 2038 $this->is_attachment = true; 2037 $post_type = $q['post_type'] = 'attachment'; 2039 $post_type = 'attachment'; 2040 $q['post_type'] = 'attachment'; 2038 2041 $this->is_page = true; 2039 2042 $q['attachment_id'] = $reqpage; … … 2889 2892 } 2890 2893 2891 $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits"; 2894 $old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits"; 2895 $this->request = $old_request; 2892 2896 2893 2897 if ( ! $q['suppress_filters'] ) { … … 3401 3405 public function query( $query ) { 3402 3406 $this->init(); 3403 $this->query = $this->query_vars = wp_parse_args( $query ); 3407 $this->query = wp_parse_args( $query ); 3408 $this->query_vars = $this->query; 3404 3409 return $this->get_posts(); 3405 3410 }
Note: See TracChangeset
for help on using the changeset viewer.