Opened 3 years ago
#57732 new feature request
Add a filter for comment template block
| Reported by: | domainsupport | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 6.1.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)