Orphaned page fix from hailin. fixes #5498
git-svn-id: https://develop.svn.wordpress.org/trunk@6427 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1671feadfc
commit
c92bf9b2f4
@ -260,14 +260,14 @@ function display_page_row( $page, &$children_pages, $level = 0 ) {
|
||||
if ( ! $children_pages )
|
||||
return true;
|
||||
|
||||
for ( $i=0; $i < count($children_pages); $i++ ) {
|
||||
for ( $i = 0; $i < count($children_pages); $i++ ) {
|
||||
|
||||
$child = $children_pages[$i];
|
||||
|
||||
if ( $child->post_parent == $id ) {
|
||||
array_splice($children_pages, $i, 1);
|
||||
array_splice($children_pages, $i, 1);
|
||||
display_page_row($child, $children_pages, $level+1);
|
||||
$i--;
|
||||
$i = -1; //as numeric keys in $children_pages are not preserved after splice
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user