pre_comment_author_email хук-фильтрWP 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.

Использование

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 Введена.

Где вызывается хук

sanitize_comment_cookies()
pre_comment_author_email
wp_filter_comment()
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 2134
$commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );

Где используется хук в 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' );