WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_get_unapproved_comment_author_email() WP 5.1.0

Get unapproved comment author's email.

Used to allow the commenter to see their pending comment.

Хуков нет.

Возвращает

Строку. The unapproved comment author's email (when supplied).

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

wp_get_unapproved_comment_author_email();

Список изменений

С версии 5.1.0 Введена.

Код wp_get_unapproved_comment_author_email() WP 5.5.1

wp-includes/comment.php
<?php
function wp_get_unapproved_comment_author_email() {
	$commenter_email = '';

	if ( ! empty( $_GET['unapproved'] ) && ! empty( $_GET['moderation-hash'] ) ) {
		$comment_id = (int) $_GET['unapproved'];
		$comment    = get_comment( $comment_id );

		if ( $comment && hash_equals( $_GET['moderation-hash'], wp_hash( $comment->comment_date_gmt ) ) ) {
			// The comment will only be viewable by the comment author for 1 minute.
			$comment_preview_expires = strtotime( $comment->comment_date_gmt . '+1 minute' );

			if ( time() < $comment_preview_expires ) {
				$commenter_email = $comment->comment_author_email;
			}
		}
	}

	if ( ! $commenter_email ) {
		$commenter       = wp_get_current_commenter();
		$commenter_email = $commenter['comment_author_email'];
	}

	return $commenter_email;
}