pre_comment_author_email
Filters the comment author's email cookie before it is set.
When this filter hook is evaluated in wp_filter_comment(), the comment author's email string is passed.
Использование
add_filter( 'pre_comment_author_email', 'wp_kama_pre_comment_author_email_filter' ); /** * Function for `pre_comment_author_email` filter-hook. * * @param string $author_email_cookie The comment author email cookie. * * @return string */ function wp_kama_pre_comment_author_email_filter( $author_email_cookie ){ // filter... return $author_email_cookie; }
- $author_email_cookie(строка)
- The comment author email cookie.
Список изменений
С версии 1.5.0 | Введена. |
Где вызывается хук
pre_comment_author_email
wp-includes/comment.php 612
$comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] );
wp-includes/comment.php 2155
$commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );
Где используется хук в WordPress
wp-includes/default-filters.php 58
add_filter( $filter, 'trim' );
wp-includes/default-filters.php 59
add_filter( $filter, 'sanitize_email' );
wp-includes/default-filters.php 60
add_filter( $filter, 'wp_filter_kses' );