author_email
Filters the comment author's email for display.
Использование
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(строка)
- The comment author's email address.
- $comment_id(строка)
- The comment ID as a numeric string.
Список изменений
С версии 1.2.0 | Введена. |
С версии 4.1.0 | The $comment_id parameter was added. |
Где вызывается хук
author_email
wp-includes/comment-template.php 134
echo apply_filters( 'author_email', $comment_author_email, $comment->comment_ID );