Make WordPress Core


Ignore:
Timestamp:
03/12/2012 06:23:48 PM (13 years ago)
Author:
ryan
Message:

Call _get_post_ancestors() from get_post_ancestors() if the ancestors property is not set in the post object. Works around situations where ancestors is not set in the cached version of the post object. see #18536

File:
1 edited

Legend:

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

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