[wp-trac] [WordPress Trac] #36901: Removing wp_die() from wp_allow_comment()

WordPress Trac noreply at wordpress.org
Thu Sep 29 07:12:42 UTC 2016


#36901: Removing wp_die() from wp_allow_comment()
-------------------------------------------------+-------------------------
 Reporter:  websupporter                         |       Owner:
     Type:  enhancement                          |  rachelbaker
 Priority:  normal                               |      Status:  assigned
Component:  Comments                             |   Milestone:  4.7
 Severity:  normal                               |     Version:  4.6
 Keywords:  has-patch needs-testing has-unit-    |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by websupporter):

 Hi Rachel,
 just downloaded and tested your patch. It worked as expected. I was
 running in duplicate and flood when I was supposed to and the error
 travelled down to `wp_handle_comment_submission()`.

 The three tests worked also as expected.

 `$avoid_die` is much better in my eyes and I like the usage of
 `wp_doing_ajax()` since we now have this function!

 If we can avoid `check_comment_flood_db()` in the action (or what I did
 with a new filter `is_comment_flood` and
 `check_comment_flood_db_filter()`) I would be very happy.

 Thanks a lot for your suggestions and your testing. For me, the current
 patch is much better :)

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


More information about the wp-trac mailing list