wp_anonymize_comment хук-фильтрWP 4.9.6

Filters whether to anonymize the comment.

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

add_filter( 'wp_anonymize_comment', 'wp_kama_anonymize_comment_filter', 10, 3 );

/**
 * Function for `wp_anonymize_comment` filter-hook.
 * 
 * @param bool|string $anon_message       Whether to apply the comment anonymization (bool) or a custom message (string).
 * @param WP_Comment  $comment            WP_Comment object.
 * @param array       $anonymized_comment Anonymized comment data.
 *
 * @return bool|string
 */
function wp_kama_anonymize_comment_filter( $anon_message, $comment, $anonymized_comment ){

	// filter...
	return $anon_message;
}
$anon_message(true|false|строка)
Whether to apply the comment anonymization (bool) or a custom message (string).
По умолчанию: true
$comment(WP_Comment)
WP_Comment object.
$anonymized_comment(массив)
Anonymized comment data.

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

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

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

wp_comments_personal_data_eraser()
wp_anonymize_comment
wp-includes/comment.php 3887
$anon_message = apply_filters( 'wp_anonymize_comment', true, $comment, $anonymized_comment );

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

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