Make WordPress Core


Ignore:
Timestamp:
01/02/2016 03:34:35 AM (11 years ago)
Author:
dd32
Message:

Comments: Ensure only approved comments trigger post author notifications
Posts that are trashed shouldn't trigger post author notifications. Adds unit tests to enforce this.

Merges [36119] to the 4.4 branch.
Props scottbrownconsulting, peterwilsoncc, swissspidy.
Fixes #35006.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/comment.php

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