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. Built from https://develop.svn.wordpress.org/branches/4.4@36146 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ac6b8ae319
commit
3ce481f130
|
@ -1805,7 +1805,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
|
|||
}
|
||||
|
||||
// Only send notifications for approved comments.
|
||||
if ( ! isset( $comment->comment_approved ) || 'spam' === $comment->comment_approved || ! $comment->comment_approved ) {
|
||||
if ( ! isset( $comment->comment_approved ) || '1' != $comment->comment_approved ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4.1-alpha-36145';
|
||||
$wp_version = '4.4.1-alpha-36146';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue