[wp-trac] [WordPress Trac] #27140: possible bug in pre_comment_approved filter

WordPress Trac noreply at wordpress.org
Mon Feb 17 18:47:25 UTC 2014


#27140: possible bug in pre_comment_approved filter
-----------------------------+----------------------
 Reporter:  realblueorange   |       Owner:
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Comments         |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:                   |     Focuses:
-----------------------------+----------------------

Comment (by realblueorange):

 Replying to [comment:6 johnbillion]:
 > It is a bit odd that we don't have a means of discarding a comment
 completely. `wp_insert_comment()` is called regardless of the return value
 of the `pre_comment_approved` filter, and there's nothing else in `wp-
 comments-post.php` or `wp_new_comment()` that can be used to discard a
 comment without inserting it.

 I couldn't agree more. I would love to have this added to the core. It
 would make writing a spam checker so much easier. All you can do right now
 is wait for the comment to be inserted and delete it later on somewhere.
 Right now I am throwing a wp_die() when my criteria aren't met, but that
 doesn't seem like the way to go.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27140#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list