author_email
Filters the comment author's email for display.
Usage
add_filter( 'author_email', 'wp_kama_author_email_filter', 10, 2 ); /** * Function for `author_email` filter-hook. * * @param string $comment_author_email The comment author's email address. * @param string $comment_id The comment ID as a numeric string. * * @return string */ function wp_kama_author_email_filter( $comment_author_email, $comment_id ){ // filter... return $comment_author_email; }
- $comment_author_email(string)
- The comment author's email address.
- $comment_id(string)
- The comment ID as a numeric string.
Changelog
Since 1.2.0 | Introduced. |
Since 4.1.0 | The $comment_id parameter was added. |
Where the hook is called
author_email
wp-includes/comment-template.php 140
echo apply_filters( 'author_email', $comment_author_email, $comment->comment_ID );