[wp-trac] [WordPress Trac] #35006: Comments sent immediately to Trash for matching keyword blacklist should not generate email notifications
WordPress Trac
noreply at wordpress.org
Sat Dec 26 04:42:39 UTC 2015
#35006: Comments sent immediately to Trash for matching keyword blacklist should
not generate email notifications
------------------------------------------------+--------------------------
Reporter: scottbrownconsulting | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting
Component: Comments | Review
Severity: normal | Version: 4.4
Keywords: needs-patch needs-unit-tests close | Resolution:
| Focuses:
------------------------------------------------+--------------------------
Comment (by scottbrownconsulting):
I have located the issue in the code of wp-includes/comment-functions.php.
The notification I'm receiving isn't an admin moderation notification
(from function wp_new_comment_notify_moderator), it's a post author
notification (from function wp_new_comment_notify_postauthor). I am both
the site administrator and the author of all my posts, so I get both.
In the case of an autotrashed comment for violating the keyword blacklist,
line 1711 in function wp_new_comment_notify_moderator traps out any
comment that doesn't have comment_approved=0 which means "Pending" status.
However, line 1738 in function wp_new_comment_notify_postauthor is
deficient in its screening comment_approved values since the change from
Spam to Trash in 4.4. It is only screening out values of 'spam' but not
values of 'trash'. A value of 'trash' needs to be newly trapped here on
line 1738, just like 'spam' is. This was apprently overlooked in the last
changeset.
Well, see, I am not imagining things :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35006#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list