comment_moderation_recipients
Filters the list of recipients for comment moderation emails.
Использование
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.
Список изменений
С версии 3.7.0 | Введена. |
Где вызывается хук
comment_moderation_recipients
wp-includes/pluggable.php 2008
$emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );