WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36302, comment 5


Ignore:
Timestamp:
04/27/2016 05:05:08 PM (5 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36302, comment 5

    initial v1  
    11Hi @frankiet - Welcome to WordPress Trac!
    22
    3 A comment 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()`.
     3A 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()`.
    44
    55Related - 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.