comment_moderation_recipients filter-hookWP 3.7.0

Filters the list of recipients for comment moderation emails.

Usage

add_filter( 'comment_moderation_recipients', 'wp_kama_comment_moderation_recipients_filter', 10, 2 );

/**
 * Function for `comment_moderation_recipients` filter-hook.
 * 
 * @param string[] $emails     List of email addresses to notify for comment moderation.
 * @param int      $comment_id Comment ID.
 *
 * @return string[]
 */
function wp_kama_comment_moderation_recipients_filter( $emails, $comment_id ){

	// filter...
	return $emails;
}
$emails(string[])
List of email addresses to notify for comment moderation.
$comment_id(int)
Comment ID.

Changelog

Since 3.7.0 Introduced.

Where the hook is called

wp_notify_moderator()
comment_moderation_recipients
wp-includes/pluggable.php 1984
$emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );

Where the hook is used in WordPress

Usage not found.