Changeset 22465
- Timestamp:
- 11/08/2012 01:52:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r22450 r22465 2771 2771 $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) ); 2772 2772 2773 $this->post_count = count( $this->posts );2774 2775 2773 // Ensure that any posts added/modified via one of the filters above are 2776 2774 // of the type WP_Post and are filtered. 2777 if ( $this->posts ) 2775 if ( $this->posts ) { 2776 $this->post_count = count( $this->posts ); 2777 2778 2778 $this->posts = array_map( 'get_post', $this->posts ); 2779 2779 2780 if ( $q['cache_results'] ) 2781 update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']); 2782 2783 if ( $this->post_count > 0 ) { 2784 $this->post = $this->posts[0]; 2780 if ( $q['cache_results'] ) 2781 update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']); 2782 2783 $this->post = reset( $this->posts ); 2784 } else { 2785 $this->post_count = 0; 2786 $this->posts = array(); 2785 2787 } 2786 2788
Note: See TracChangeset
for help on using the changeset viewer.