[wp-trac] [WordPress Trac] #57105: Enhance wp_handle_comment_submission() with a custom validation

WordPress Trac noreply at wordpress.org
Mon Nov 14 19:24:58 UTC 2022


#57105: Enhance wp_handle_comment_submission() with a custom validation
-------------------------+------------------------------
 Reporter:  apermo       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi there, thanks for the ticket!

 I might be missing something, but it looks like custom validation should
 already be possible via the `pre_comment_approved` filter, which receives
 `$commentdata` and allows for returning a `WP_Error` as of [41980] /
 #39730, pretty much like the patch suggested here.

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


More information about the wp-trac mailing list