pre_comment_author_email filter-hookWP 1.5.0

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.

Usage

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(string)
The comment author email cookie.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

sanitize_comment_cookies()
pre_comment_author_email
wp_filter_comment()
pre_comment_author_email
wp-includes/comment.php 611
$comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] );
wp-includes/comment.php 2137
$commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );

Where the hook is used in WordPress

wp-includes/default-filters.php 52
add_filter( $filter, 'trim' );
wp-includes/default-filters.php 53
add_filter( $filter, 'sanitize_email' );
wp-includes/default-filters.php 54
add_filter( $filter, 'wp_filter_kses' );