comment_notification_recipients WordPress Filter Hook

The comment_notification_recipients hook is used to modify the list of email addresses that will receive a notification when a new comment is made. This hook is useful for cases where you want to add or remove an email address from the notification list.

apply_filters( 'comment_notification_recipients', string[] $emails, string $comment_id ) #

Filters the list of email addresses to receive a comment notification.


Description

By default, only post authors are notified of comments. This filter allows others to be added.


Top ↑

Parameters

$emails

(string[])An array of email addresses to receive a comment notification.

$comment_id

(string)The comment ID as a numeric string.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More