notify_post_author filter-hook . WP 4.4.0
Filters whether to send the post author new comment notification emails, overriding the site setting.
Usage
add_filter( 'notify_post_author', 'filter_function_name_8915', 10, 2 ); function filter_function_name_8915( $maybe_notify, $comment_ID ){ // filter... return $maybe_notify; }
- $maybe_notify(true/false)
- Whether to notify the post author about the new comment.
- $comment_ID(int)
- The ID of the comment for the notification.
Where the hook is called
notify_post_author
wp-includes/comment.php 2071
$maybe_notify = apply_filters( 'notify_post_author', $maybe_notify, $comment_ID );