comment_text хук-фильтрWC 1.2.0

Это хук WordPress - comment_text. Плагин его просто использует.

This filter is documented in wp-includes/comment-template.php

Использование

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(строка)
Text of the comment.
$comment(WP_Comment|null)
The comment object. Null if not found.
$args(массив)
An array of arguments.

Список изменений

С версии 1.2.0 Введена.

Где вызывается хук

ProductReviewContent::render()
comment_text
woocommerce/src/Blocks/BlockTypes/Reviews/ProductReviewContent.php 48
$comment_text = apply_filters( 'comment_text', $comment_text, $comment, $args );

Где используется хук в WooCommerce

Использование не найдено.