wphooks.info - comment_notification_recipients

comment_notification_recipients

The hook occurs in the following file:

wp-includes/pluggable.php:
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
	 * Filters the list of email addresses to receive a comment notification.
	 *
	 * By default, only post authors are notified of comments. This filter allows
	 * others to be added.
	 *
	 * @since 3.7.0
	 *
	 * @param array $emails     An array of email addresses to receive a comment notification.
	 * @param int   $comment_id The comment ID.
	 */
	$emails = apply_filters( 'comment_notification_recipients', $emails, $comment->comment_ID );
	$emails = array_filter( $emails );

	// If there are no addresses to send the comment to, bail.
	if ( ! count( $emails ) ) {
		return false;
	}

	// Facilitate unsetting below without knowing the keys.
	$emails = array_flip( $emails );