// If there's no email to send the comment to, bail, otherwise flip array back around for use below.
if ( !
count( $emails ) ) { return false;
} else { $emails =
array_flip( $emails );
} $switched_locale =
switch_to_locale( get_locale() );
$comment_author_domain = '';
if ( WP_Http::
is_ip_address( $comment->comment_author_IP
) ) { $comment_author_domain =
gethostbyaddr( $comment->comment_author_IP
);
} /*
* The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
* We want to reverse this for the plain text arena of emails.
*/
$blogname =
wp_specialchars_decode( get_option( 'blogname'
), ENT_QUOTES
);
$comment_content =
wp_specialchars_decode( $comment->comment_content
);
switch ( $comment->comment_type
) {