diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index ada53c8997..a86e5e7286 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1330,11 +1330,16 @@ function comments_template( $file = '/comments.php', $separate_comments = false // Trees must be flattened before they're passed to the walker. $comments_flat = array(); foreach ( $_comments as $_comment ) { - $comments_flat = array_merge( $comments_flat, array( $_comment ), $_comment->get_children( array( + $comments_flat[] = $_comment; + $comment_children = $_comment->get_children( array( 'format' => 'flat', 'status' => $comment_args['status'], 'orderby' => $comment_args['orderby'] - ) ) ); + ) ); + + foreach ( $comment_children as $comment_child ) { + $comments_flat[] = $comment_child; + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index f177b02ac6..8884551600 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4.1-alpha-35921'; +$wp_version = '4.4.1-alpha-35932'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.