Move children of nested levels not shown to after the current element, not inside it like children. See #8841
git-svn-id: https://develop.svn.wordpress.org/trunk@13938 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7e33f4a479
commit
393c94d1a5
@ -1312,11 +1312,6 @@ class Walker_Comment extends Walker {
|
||||
$this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
|
||||
}
|
||||
unset( $children_elements[ $id ] );
|
||||
} elseif ( $max_depth <= $depth + 1 && isset( $children_elements[$id]) ) {
|
||||
// this elseif block is the only change from Walker::display_element()
|
||||
foreach( $children_elements[ $id ] as $child )
|
||||
$this->display_element( $child, $children_elements, $max_depth, $depth, $args, $output );
|
||||
unset( $children_elements[ $id ] );
|
||||
}
|
||||
|
||||
if ( isset($newlevel) && $newlevel ){
|
||||
@ -1328,6 +1323,14 @@ class Walker_Comment extends Walker {
|
||||
//end this element
|
||||
$cb_args = array_merge( array(&$output, $element, $depth), $args);
|
||||
call_user_func_array(array(&$this, 'end_el'), $cb_args);
|
||||
|
||||
if ( $max_depth <= $depth + 1 && isset( $children_elements[$id]) ) {
|
||||
// this if block is the only change from Walker::display_element()
|
||||
foreach ( $children_elements[ $id ] as $child )
|
||||
$this->display_element( $child, $children_elements, $max_depth, $depth, $args, $output );
|
||||
unset( $children_elements[ $id ] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user