mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Move children of nested levels not shown to after the current element, not inside it like children. See #8841
git-svn-id: http://svn.automattic.com/wordpress/trunk@13938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc7dbbcc3e
commit
364faf559e
@ -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