Opened 20 months ago
#57732 new feature request
Add a filter for comment template block
Reported by: | domainsupport | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.1.1 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
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 ...
<?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,
Oliver
Note: See
TracTickets for help on using
tickets.