Skip to content

Commit

Permalink
Pass a post object instead of ID to help preserve ancestors. Props du…
Browse files Browse the repository at this point in the history
…ck_. fixes #18536

git-svn-id: http://core.svn.wordpress.org/trunk@21073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Jun 12, 2012
1 parent a10e86c commit 8142f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/query.php
Expand Up @@ -2673,7 +2673,7 @@ function &get_posts() {

// 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 ) {
Expand Down

0 comments on commit 8142f2e

Please sign in to comment.