Fix page walk bug. fixes #2516
git-svn-id: http://svn.automattic.com/wordpress/trunk@3578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
25c2dcac3c
commit
0c110bc342
|
@ -747,7 +747,7 @@ function walk_page_tree($pages, $to_depth, $start_element_callback, $end_element
|
||||||
$cb_args = array_merge( array($output, $depth), $args);
|
$cb_args = array_merge( array($output, $depth), $args);
|
||||||
$output = call_user_func_array($start_level_callback, $cb_args);
|
$output = call_user_func_array($start_level_callback, $cb_args);
|
||||||
}
|
}
|
||||||
} else if ( $depth && ($page->post_parent == $parents[0]->ID) ) {
|
} else if ( $depth && ($page->post_parent == $previous_page->post_parent) ) {
|
||||||
// On the same level as previous page.
|
// On the same level as previous page.
|
||||||
if ( !$to_depth || ($depth < $to_depth) ) {
|
if ( !$to_depth || ($depth < $to_depth) ) {
|
||||||
if ( !empty($end_element_callback) ) {
|
if ( !empty($end_element_callback) ) {
|
||||||
|
|
Loading…
Reference in New Issue