git-svn-id: http://core.svn.wordpress.org/trunk@21559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2643,19 +2643,20 @@ class WP_Query {
|
||||
|
||||
if ( $ids ) {
|
||||
$this->set_found_posts( $q, $limits );
|
||||
|
||||
_prime_post_caches( $ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] );
|
||||
|
||||
$this->posts = array_map( 'get_post', $ids );
|
||||
$this->posts = $ids;
|
||||
} else {
|
||||
$this->found_posts = $this->max_num_pages = 0;
|
||||
$this->posts = array();
|
||||
$this->found_posts = $this->max_num_pages = 0;
|
||||
}
|
||||
} else {
|
||||
$this->posts = $wpdb->get_results( $this->request );
|
||||
$this->set_found_posts( $q, $limits );
|
||||
}
|
||||
|
||||
// Convert to WP_Post objects
|
||||
$this->posts = array_map( 'get_post', $this->posts );
|
||||
|
||||
// Raw results filter. Prior to status checks.
|
||||
if ( !$q['suppress_filters'] )
|
||||
$this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) );
|
||||
|
||||
Reference in New Issue
Block a user