wp_anonymize_comment хук-фильтр . WP 4.9.6
Filters whether to anonymize the comment.
Использование
add_filter( 'wp_anonymize_comment', 'filter_function_name_4431', 10, 3 ); function filter_function_name_4431( $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_anonymize_comment
wp-includes/comment.php 3762
$anon_message = apply_filters( 'wp_anonymize_comment', true, $comment, $anonymized_comment );