Pass a post object instead of ID to help preserve ancestors. Props duck_. fixes #18536
git-svn-id: http://core.svn.wordpress.org/trunk@21073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a10e86c351
commit
8142f2eb36
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue