Make WordPress Core


Ignore:
Timestamp:
12/29/2015 05:53:23 PM (9 years ago)
Author:
jorbin
Message:

Ensure only approved comments trigger post author notifications

Posts that are trashed shouldn't trigger post author notifications. Adds unit tests to enforce this.

Props scottbrownconsulting, peterwilsoncc, swissspidy
Fixes #35006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r36115 r36119  
    18031803
    18041804    // Only send notifications for approved comments.
    1805     if ( ! isset( $comment->comment_approved ) || 'spam' === $comment->comment_approved || ! $comment->comment_approved ) {
     1805    if ( ! isset( $comment->comment_approved ) || '1' != $comment->comment_approved ) {
    18061806        return false;
    18071807    }
Note: See TracChangeset for help on using the changeset viewer.