WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 3755 | * Filters whether to anonymize the comment. |
| 3756 | * |
| 3757 | * @since 4.9.6 |
| 3758 | * |
| 3759 | * @param bool|string $anon_message Whether to apply the comment anonymization (bool) or a custom |
| 3760 | * message (string). Default true. |
| 3761 | * @param WP_Comment $comment WP_Comment object. |
| 3762 | * @param array $anonymized_comment Anonymized comment data. |
| 3763 | */ |
| 3764 | $anon_message = apply_filters( 'wp_anonymize_comment', true, $comment, $anonymized_comment ); |
| 3765 | |
| 3766 | if ( true !== $anon_message ) { |
| 3767 | if ( $anon_message && is_string( $anon_message ) ) { |
| 3768 | $messages[] = esc_html( $anon_message ); |
| 3769 | } else { |
| 3770 | /* translators: %d: Comment ID. */ |
| 3771 | $messages[] = sprintf( __( 'Comment %d contains personal data but could not be anonymized.' ), $comment_id ); |
| 3772 | } |
| 3773 | |