[wp-trac] [WordPress Trac] #36302: wp_update_comment needs a filter

WordPress Trac noreply at wordpress.org
Wed Apr 27 17:15:53 UTC 2016


#36302: wp_update_comment needs a filter
-------------------------+------------------------------
 Reporter:  frankiet     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  4.4.2
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------

Comment (by dshanske):

 Would the location I suggested, at the array merge work better?

 Replying to [comment:5 boonebgorges]:
 > Hi @frankiet - Welcome to WordPress Trac!
 >
 > A filter somewhere in here seems like an OK idea, but I wonder whether
 you've chosen the best place for it. It seems to me that we would want the
 filter to appear *after* all pre-processing has taken place (eg, setting
 'comment_approved' based on context), but before any database-related
 sanitization takes place (eg, `wp_unslash()`). See, for example, the way
 that the similar 'wp_insert_post_data' filter works in `wp_insert_post()`.
 >
 > Related - let's come up with a better filter name. 'wp_update_comment'
 sounds to me (given our naming conventions) like an action that would fire
 at a certain point during the comment update process. Something like
 'wp_update_comment_data' seems more appropriate, and it parallels other
 filter names better.

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


More information about the wp-trac mailing list