mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 05:34:26 +00:00
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 git-svn-id: https://develop.svn.wordpress.org/trunk@36119 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1802,7 +1802,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user