diff --git a/packages/block-library/src/comment-template/index.php b/packages/block-library/src/comment-template/index.php index 49ca8561e2d47a..770959854b58ad 100644 --- a/packages/block-library/src/comment-template/index.php +++ b/packages/block-library/src/comment-template/index.php @@ -16,6 +16,8 @@ */ function block_core_comment_template_render_comments( $comments, $block ) { global $comment_depth; + $thread_comments = get_option( 'thread_comments' ); + $thread_comments_depth = get_option( 'thread_comments_depth' ); if ( empty( $comment_depth ) ) { $comment_depth = 1; @@ -46,14 +48,22 @@ function block_core_comment_template_render_comments( $comments, $block ) { // If the comment has children, recurse to create the HTML for the nested // comments. - if ( ! empty( $children ) ) { - $comment_depth += 1; - $inner_content = block_core_comment_template_render_comments( - $children, - $block - ); - $block_content .= sprintf( '