comment_text
This is a WordPress - comment_text hook. The plugin just uses it.
This filter is documented in wp-includes/comment-template.php
Usage
add_filter( 'comment_text', 'wp_kama_comment_text_filter', 10, 3 );
/**
* Function for `comment_text` filter-hook.
*
* @param string $comment_text Text of the comment.
* @param WP_Comment|null $comment The comment object. Null if not found.
* @param array $args An array of arguments.
*
* @return string
*/
function wp_kama_comment_text_filter( $comment_text, $comment, $args ){
// filter...
return $comment_text;
}
- $comment_text(string)
- Text of the comment.
- $comment(WP_Comment|null)
- The comment object. Null if not found.
- $args(array)
- An array of arguments.
Changelog
| Since 1.2.0 | Introduced. |
Where the hook is called
comment_text
woocommerce/src/Blocks/BlockTypes/Reviews/ProductReviewContent.php 48
$comment_text = apply_filters( 'comment_text', $comment_text, $comment, $args );