Make WordPress Core


Ignore:
Timestamp:
08/20/2012 07:47:52 PM (12 years ago)
Author:
ryan
Message:

Introduce WP_Post class. Clean up ancestors handling. Props scribu, toppa. fixes #10381 see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r21248 r21559  
    26442644            if ( $ids ) {
    26452645                $this->set_found_posts( $q, $limits );
    2646 
    26472646                _prime_post_caches( $ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] );
    2648 
    2649                 $this->posts = array_map( 'get_post', $ids );
     2647                $this->posts = $ids;
    26502648            } else {
     2649                $this->posts = array();
    26512650                $this->found_posts = $this->max_num_pages = 0;
    2652                 $this->posts = array();
    26532651            }
    26542652        } else {
     
    26562654            $this->set_found_posts( $q, $limits );
    26572655        }
     2656
     2657        // Convert to WP_Post objects
     2658        $this->posts = array_map( 'get_post', $this->posts );
    26582659
    26592660        // Raw results filter. Prior to status checks.
Note: See TracChangeset for help on using the changeset viewer.