pre_comment_author_email WordPress Filter Hook
The pre_comment_author_email hook is called before the comment author's email address is sanitized. This hook allows you to modify the comment author's email address before it is sanitized by WordPress. This can be useful if you want to allow users to enter their email address in a certain format, or if you want to make sure that all comment author email addresses are in a certain domain.
apply_filters( 'pre_comment_author_email', string $author_email_cookie ) #
Filters the comment author’s email cookie before it is set.
Description
When this filter hook is evaluated in wp_filter_comment(), the comment author’s email string is passed.
Parameters
- $author_email_cookie
(string)The comment author email cookie.
Source
File: wp-includes/comment.php
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |