Properly indent after [21952]. see #11399.
git-svn-id: http://core.svn.wordpress.org/trunk@21953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a42ce2353a
commit
29b7d26ca5
|
@ -557,9 +557,11 @@ function get_post_ancestors( $post ) {
|
||||||
|
|
||||||
$post = get_post( $post );
|
$post = get_post( $post );
|
||||||
|
|
||||||
|
if ( empty( $post->post_parent ) || $post->post_parent == $post->ID )
|
||||||
|
return array();
|
||||||
|
|
||||||
$ancestors = array();
|
$ancestors = array();
|
||||||
|
|
||||||
if ( !empty( $post->post_parent ) && $post->ID != $post->post_parent ) {
|
|
||||||
$id = $ancestors[] = $post->post_parent;
|
$id = $ancestors[] = $post->post_parent;
|
||||||
|
|
||||||
while ( $ancestor = get_post( $id ) ) {
|
while ( $ancestor = get_post( $id ) ) {
|
||||||
|
@ -569,7 +571,6 @@ function get_post_ancestors( $post ) {
|
||||||
|
|
||||||
$id = $ancestors[] = $ancestor->post_parent;
|
$id = $ancestors[] = $ancestor->post_parent;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $ancestors;
|
return $ancestors;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue