Make WordPress Core


Ignore:
Timestamp:
09/27/2022 05:30:41 PM (4 years ago)
Author:
hellofromTonya
Message:

Editor: Update packages for 6.1 Beta 2.

Package updates for bug and regression fixes:

  • @wordpress/block-directory: 3.15.3
  • @wordpress/block-editor: 10.0.3
  • @wordpress/block-library: 7.14.3
  • @wordpress/block-serialization-default-parser: 4.17.1
  • @wordpress/blocks: 11.16.3
  • @wordpress/components: 21.0.3
  • @wordpress/compose: 5.15.2
  • @wordpress/core-data: 5.0.3
  • @wordpress/customize-widgets: 3.14.3
  • @wordpress/edit-post: 6.14.3
  • @wordpress/edit-site: 4.14.4
  • @wordpress/edit-widgets: 4.14.3
  • @wordpress/editor: 12.16.3
  • @wordpress/format-library: 3.15.3
  • @wordpress/interface: 4.16.3
  • @wordpress/list-reusable-blocks: 3.15.3
  • @wordpress/nux: 5.15.3
  • @wordpress/preferences: 2.9.3
  • @wordpress/reusable-blocks: 3.15.3
  • @wordpress/server-side-render: 3.15.3
  • @wordpress/style-engine: 1.0.2
  • @wordpress/widgets: 2.15.3

References:

Props bernhard-reiter, cbravobernal.
See #56467.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/comment-template.php

    r53338 r54335  
    1717function block_core_comment_template_render_comments( $comments, $block ) {
    1818        global $comment_depth;
     19        $thread_comments       = get_option( 'thread_comments' );
     20        $thread_comments_depth = get_option( 'thread_comments_depth' );
    1921
    2022        if ( empty( $comment_depth ) ) {
    … …  
    4749                // If the comment has children, recurse to create the HTML for the nested
    4850                // comments.
    49                 if ( ! empty( $children ) ) {
    50                         $comment_depth += 1;
    51                         $inner_content  = block_core_comment_template_render_comments(
    52                                 $children,
    53                                 $block
    54                         );
    55                         $block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
    56                         $comment_depth -= 1;
     51                if ( ! empty( $children ) && ! empty( $thread_comments ) ) {
     52                        if ( $comment_depth < $thread_comments_depth ) {
     53                                $comment_depth += 1;
     54                                $inner_content  = block_core_comment_template_render_comments(
     55                                        $children,
     56                                        $block
     57                                );
     58                                $block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
     59                                $comment_depth -= 1;
     60                        } else {
     61                                $inner_content  = block_core_comment_template_render_comments(
     62                                        $children,
     63                                        $block
     64                                );
     65                                $block_content .= sprintf( $inner_content );
     66                        }
    5767                }
    5868
Note: See TracChangeset for help on using the changeset viewer.