Make WordPress Core


Ignore:
Timestamp:
04/26/2022 01:39:57 PM (3 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages for 6.0 Beta 3

Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 2.

Props zieladam, ndiego.
See #55567.

File:
1 edited

Legend:

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

    r53219 r53278  
    88/**
    99 * Function that recursively renders a list of nested comments.
     10 *
     11 * @global int $comment_depth
    1012 *
    1113 * @param WP_Comment[] $comments        The array of comments.
     
    3234        $children = $comment->get_children();
    3335
     36        /*
     37         * We need to create the CSS classes BEFORE recursing into the children.
     38         * This is because comment_class() uses globals like `$comment_alt`
     39         * and `$comment_thread_alt` which are order-sensitive.
     40         *
     41         * The `false` parameter at the end means that we do NOT want the function
     42         * to `echo` the output but to return a string.
     43         * See https://developer.wordpress.org/reference/functions/comment_class/#parameters.
     44         */
     45        $comment_classes = comment_class( '', $comment->comment_ID, $comment->comment_post_ID, false );
     46
    3447        // If the comment has children, recurse to create the HTML for the nested
    3548        // comments.
     
    4356            $comment_depth -= 1;
    4457        }
    45 
    46         // The `false` parameter at the end means that we do NOT want the function to `echo` the output but to return a string.
    47         // See https://developer.wordpress.org/reference/functions/comment_class/#parameters.
    48         $comment_classes = comment_class( '', $comment->comment_ID, $comment->comment_post_ID, false );
    4958
    5059        $content .= sprintf( '<li id="comment-%1$s" %2$s>%3$s</li>', $comment->comment_ID, $comment_classes, $block_content );
Note: See TracChangeset for help on using the changeset viewer.