wp_anonymize_comment WordPress Filter Hook

The wp_anonymize_comment hook allows you to anonymize a comment before it is saved to the database. This is useful if you want to keep the comment author's identity confidential.

apply_filters( 'wp_anonymize_comment', bool|string $anon_message, WP_Comment $comment, array $anonymized_comment ) #

Filters whether to anonymize the comment.


Parameters

$anon_message

(bool|string)Whether to apply the comment anonymization (bool) or a custom message (string). Default true.

$comment

(WP_Comment)WP_Comment object.

$anonymized_comment

(array)Anonymized comment data.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.6Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More