[wp-trac] [WordPress Trac] #36901: Removing wp_die() from wp_allow_comment()
WordPress Trac
noreply at wordpress.org
Tue Oct 11 03:18:27 UTC 2016
#36901: Removing wp_die() from wp_allow_comment()
-------------------------------------------------+-------------------------
Reporter: websupporter | Owner:
Type: enhancement | boonebgorges
Priority: normal | Status: accepted
Component: Comments | Milestone: 4.7
Severity: normal | Version: 4.6
Keywords: has-patch needs-testing has-unit- | Resolution:
tests needs-dev-note | Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):
* owner: websupporter => boonebgorges
* status: reviewing => accepted
Comment:
I've done a search of the wordpress.org plugin repo, and I didn't find a
single instance of `check_comment_flood_db()` being called directly. It's
always in the context of `remove_filter()` etc, which will continue to
work without the added tricks in [attachment:36901.9.diff]. So I'm going
to go with the simpler approach of [attachment:36901.8.diff].
I'll write a make/core post that explains the issue.
Also, after discussion with @rachelbaker in Slack (linked above), I'll be
removing the HTML status code being passed as data to the `WP_Error`
objects. The parallel with `wp_handle_comment_submission()` is not
entirely accurate; error objects in that function need status codes for
certain backward compatibility reasons. The error string
('comment_duplicate', etc) contains enough information to differentiate
the nature of the error, and the consumer of the error can decide which
HTML status code it wants to use when handling the error (if HTML status
codes are even relevant for the consumer).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36901#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list