Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_anonymize_comment

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3780            * Filters whether to anonymize the comment.
3781            *
3782            * @since 4.9.6
3783            *
3784            * @param bool|string $anon_message       Whether to apply the comment anonymization (bool) or a custom
3785            *                                        message (string). Default true.
3786            * @param WP_Comment  $comment            WP_Comment object.
3787            * @param array       $anonymized_comment Anonymized comment data.
3788            */
3789           $anon_message = apply_filters( 'wp_anonymize_comment', true, $comment, $anonymized_comment );
3790
3791           if ( true !== $anon_message ) {
3792                if ( $anon_message && is_string( $anon_message ) ) {
3793                     $messages[] = esc_html( $anon_message );
3794                } else {
3795                     /* translators: %d: Comment ID. */
3796                     $messages[] = sprintf( __( 'Comment %d contains personal data but could not be anonymized.' ), $comment_id );
3797                }
3798