[wp-trac] [WordPress Trac] #24913: comment_text filter used differently in two places in core

WordPress Trac noreply at wordpress.org
Tue Jan 3 08:33:08 UTC 2017


#24913: comment_text filter used differently in two places in core
----------------------------------------+------------------------------
 Reporter:  ronalfy                     |       Owner:
     Type:  defect (bug)                |      Status:  reopened
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Comments                    |     Version:  3.6
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------
Changes (by dd32):

 * keywords:  dev-feedback => needs-patch good-first-bug
 * milestone:   => Awaiting Review


Comment:

 IMHO: The pre-check filter should pass `null` and `array()` for `$args`,
 and the filter documentation should be updated to account for it. The
 documentation should explicitly point out that the comment context is
 unavailable during comment creation/checking which is why it's `null`.

 Ideally they'd be differently named filters, but we can't change that now.
 Historically the filter probably wasn't passed the context of the comment
 object, which is why it'd have made sense once upon a time.

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


More information about the wp-trac mailing list