What file sends comment notification emails?
-
Which core file calls the mail function to send out the new comment notification email? I want to write a small function to check if the comment was blacklisted and if so not send the email. Currently I receive an email notification even if the comment is auto-trashed through the blacklist.
Edit
I think I figured it out, later on in comment.php it is sent through this function:
if ( get_option('comments_notify') && $commentdata['comment_approved'] && $commentdata['comment_approved'] !== "trash" && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) ) wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' ); }
- The topic ‘What file sends comment notification emails?’ is closed to new replies.