wphooks.info - comment_notification_notify_author

comment_notification_notify_author

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/pluggable.php:
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
	 *
	 * By default, comment authors aren't notified of their comments on their own
	 * posts. This filter allows you to override that.
	 *
	 * @since 3.8.0
	 *
	 * @param bool $notify     Whether to notify the post author of their own comment.
	 *                         Default false.
	 * @param int  $comment_id The comment ID.
	 */
	$notify_author = apply_filters( 'comment_notification_notify_author', false, $comment->comment_ID );

	// The comment was left by the author
	if ( $author && ! $notify_author && $comment->user_id == $post->post_author ) {
		unset( $emails[ $author->user_email ] );
	}

	// The author moderated a comment on their own post
	if ( $author && ! $notify_author && $post->post_author == get_current_user_id() ) {
		unset( $emails[ $author->user_email ] );