Make WordPress Core

Changeset 21073


Ignore:
Timestamp:
06/12/2012 11:09:27 PM (12 years ago)
Author:
ryan
Message:

Pass a post object instead of ID to help preserve ancestors. Props duck_. fixes #18536

File:
1 edited

Legend:

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

    r20836 r21073  
    26742674        // Check post status to determine if post should be displayed.
    26752675        if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
    2676             $status = get_post_status($this->posts[0]->ID);
     2676            $status = get_post_status($this->posts[0]);
    26772677            $post_status_obj = get_post_status_object($status);
    26782678            //$type = get_post_type($this->posts[0]);
Note: See TracChangeset for help on using the changeset viewer.