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

WordPress Trac noreply at wordpress.org
Tue Oct 4 15:50:36 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 mdgl):

 Visiting from #18630 I think this patch is moving along the right sort of
 lines.  The latest version, however appears to break backwards
 compatibility with approaches such as that mentioned in comment:16.
 Developers will expect to be able to unhook `check_comment_flood_db()` and
 attach their own function to action `check_comment_flood` to customise
 this behaviour.  Furthermore, the implied double negative in the naming of
 `$avoid_die` is rather confusing and would probably be better specified in
 the positive.  My earlier patch on #18630 followed the convention
 established by `wp_insert_post()` and `wp_set_comment_status()` although I
 agree this is still a bit ugly and that the overall code base isn't very
 consistent in this regard. The new patch also has a minor typo in the
 comments: "wheter" which should be "whether".

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


More information about the wp-trac mailing list