Properly indent after [21952]. see #11399.

git-svn-id: https://develop.svn.wordpress.org/trunk@21953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-22 16:21:06 +00:00
parent b7198b85f8
commit 3f051e73ef
1 changed files with 11 additions and 10 deletions

View File

@ -557,9 +557,11 @@ function get_post_ancestors( $post ) {
$post = get_post( $post );
if ( empty( $post->post_parent ) || $post->post_parent == $post->ID )
return array();
$ancestors = array();
if ( !empty( $post->post_parent ) && $post->ID != $post->post_parent ) {
$id = $ancestors[] = $post->post_parent;
while ( $ancestor = get_post( $id ) ) {
@ -569,7 +571,6 @@ function get_post_ancestors( $post ) {
$id = $ancestors[] = $ancestor->post_parent;
}
}
return $ancestors;
}