comment_notification_recipients хук-фильтр . 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.
Использование
add_filter( 'comment_notification_recipients', 'filter_function_name_3434', 10, 2 ); function filter_function_name_3434( $emails, $comment_id ){ // filter... return $emails; }
- $emails(строка[])
- An array of email addresses to receive a comment notification.
- $comment_id(число)
- The comment ID.
Список изменений
С версии 3.7.0 | Введена. |
Где вызывается хук
comment_notification_recipients
wp-includes/pluggable.php 1530
$emails = apply_filters( 'comment_notification_recipients', $emails, $comment->comment_ID );