[wp-trac] [WordPress Trac] #38314: comment_text filter is passed inconsistent arguments

WordPress Trac noreply at wordpress.org
Fri Oct 14 21:53:54 UTC 2016


#38314: comment_text filter is passed inconsistent arguments
-----------------------------+----------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Future Release
Component:  Comments         |    Version:
 Severity:  normal           |   Keywords:  needs-patch
  Focuses:                   |
-----------------------------+----------------------------
 Only one argument is supplied in `check_comment()`:

 {{{
 /** This filter is documented in wp-includes/comment-template.php */
 $comment = apply_filters( 'comment_text', $comment );
 }}}

 However, three arguments are supplied in `comment_text()`:

 {{{
 echo apply_filters( 'comment_text', $comment_text, $comment, $args );
 }}}

 The former should probably have two null values passed so error notices
 aren't triggered in callbacks hooking into the latter.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38314>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list