WordPress.org

Make WordPress Core

Ticket #35006: 35006.diff

File 35006.diff, 635 bytes (added by peterwilsoncc, 5 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index a84f0a7..d2b7d6f 100644
    a b function wp_new_comment_notify_postauthor( $comment_ID ) { 
    18021802        }
    18031803
    18041804        // Only send notifications for approved comments.
    1805         if ( ! isset( $comment->comment_approved ) || 'spam' === $comment->comment_approved || ! $comment->comment_approved ) {
     1805        if (
     1806                ! isset( $comment->comment_approved )  ||
     1807                'spam'  === $comment->comment_approved ||
     1808                'trash' === $comment->comment_approved ||
     1809                ! $comment->comment_approved
     1810                ) {
    18061811                return false;
    18071812        }
    18081813