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

git-svn-id: https://develop.svn.wordpress.org/trunk@21073 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-06-12 23:09:27 +00:00
parent 36b3057a77
commit a0a36d35c9
1 changed files with 1 additions and 1 deletions

View File

@ -2673,7 +2673,7 @@ class WP_Query {
// Check post status to determine if post should be displayed.
if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
$status = get_post_status($this->posts[0]->ID);
$status = get_post_status($this->posts[0]);
$post_status_obj = get_post_status_object($status);
//$type = get_post_type($this->posts[0]);
if ( !$post_status_obj->public ) {