Make WordPress Core

Ticket #33587: 33587.7.diff

File 33587.7.diff, 586 bytes (added by cfinke, 10 years ago)

Prevent notifications from being sent when the comment was caught as spam.

  • wp-includes/comment-functions.php

     
    16691669         * `wp_notify_postauthor()` checks if notifying the author of their own comment.
    16701670         * By default, it won't, but filters can override this.
    16711671         */
    1672         if ( get_option( 'comments_notify' ) && $comment->comment_approved ) {
     1672        if ( '1' == $comment->comment_approved && get_option( 'comments_notify' ) ) {
    16731673                wp_notify_postauthor( $comment_ID );
    16741674        }
    16751675}