[wp-trac] [WordPress Trac] #38314: comment_text filter is passed inconsistent arguments
WordPress Trac
noreply at wordpress.org
Thu Oct 20 19:10:27 UTC 2016
#38314: comment_text filter is passed inconsistent arguments
-----------------------------+-----------------------------
Reporter: danielbachhuber | Owner: drewapicture
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+-----------------------------
Changes (by boonebgorges):
* owner: => drewapicture
* status: new => reviewing
Comment:
Timeline, for reference:
- [15957] `$comment` arg added to filter in `comment_text()`
- [16357] 'comment_text' filter introduced in `check_comment()`. At this
point, the two uses of the filter have already diverged
- [25555] added the `$args` param to the filter in `comment_text()`
Passing null values in `check_comment()` would prevent against certain
kinds of errors, but it also makes the filter documentation incorrect.
@DrewAPicture do you have a suggestion for how to document this kind of
problem? Can we say, eg,
{{{
* @param null|WP_Comment $comment Comment object, if available.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38314#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list