[wp-trac] [WordPress Trac] #40664: Handling of empty comments
WordPress Trac
noreply at wordpress.org
Thu May 4 14:21:03 UTC 2017
#40664: Handling of empty comments
-------------------------+-----------------------------
Reporter: zakalwe | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.7.4
Severity: normal | Keywords:
Focuses: ui |
-------------------------+-----------------------------
I couldn't find any decent way of avoiding the "ERROR: please type a
comment" message to appear if an empty comment is submitted. I was hoping
to hook in somewhere and perform some custom action if an empty comment is
encountered. The attached patch simply provides an action
"require_valid_comment" that can be hooked into passing the post ID as the
only argument. For my own use, I would redirect the user back to the post
and tag on an error to be picked up in a custom comments template.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40664>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list