Make WordPress Core

Opened 17 months ago

#57732 new feature request

Add a filter for comment template block

Reported by: domainsupport's profile domainsupport Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: Comments Keywords:
Focuses: Cc:


It would be good to be able to filter the block content when rendering comments in the comment template block.

This would enable developers to inject content in / before / after specific comments.

Ideally something like this on line 68 of /wp-includes/blocks/comment-template.php ...


 * Filters each comment before being added to the comment template block
 * @since 6.2.0
 * @param string $block_content The content of the comment block.
 * @param object $comment The comment object.
$block_content = apply_filters( 'comment_template_comment_block_content', $block_content, $comment );

Would this be possible?

Thank you,


Change History (0)

Note: See TracTickets for help on using tickets.