// 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 &&
get_current_user_id() ==
$post->post_author
) { unset( $emails[ $author->user_email
] );
} // The post author is no longer a member of the blog.
if ( $author && !
$notify_author && !
user_can( $post->post_author, 'read_post',
$post->ID
) ) { unset( $emails[ $author->user_email
] );
} // If there's no email to send the comment to, bail, otherwise flip array back around for use below.
if ( !
count( $emails ) ) { return false;
} else { $emails =
array_flip( $emails );
} $switched_locale =
switch_to_locale( get_locale() );