comment_notification_recipients filter-hook . WP 3.7.0
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.
Usage
add_filter( 'comment_notification_recipients', 'filter_function_name_6204', 10, 2 ); function filter_function_name_6204( $emails, $comment_id ){ // filter... return $emails; }
- $emails(string[])
- An array of email addresses to receive a comment notification.
- $comment_id(int)
- The comment ID.
Changelog
Since 3.7.0 | Introduced. |
Where the hook is called
comment_notification_recipients
wp-includes/pluggable.php 1530
$emails = apply_filters( 'comment_notification_recipients', $emails, $comment->comment_ID );