mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Orphaned page fix from hailin. fixes #5498
git-svn-id: http://svn.automattic.com/wordpress/trunk@6427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de5340b9f3
commit
8273b56d60
@ -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