[wp-trac] [WordPress Trac] #43792: get_comment_excerpt filter should tell if the comment was shorted or not

WordPress Trac noreply at wordpress.org
Tue Apr 17 23:25:06 UTC 2018


#43792: get_comment_excerpt filter should tell if the comment was shorted or not
-------------------------------------------------+-------------------------
 Reporter:  mattkeys                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Comments                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing dev-         |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by mattkeys):

 I don't believe that to be the case, but would be interested to hear more
 if you are able to reproduce what you are saying.

 The argument I added is at the 'end' of the current list of arguments.
 Anyone who is currently using the filter like so:

 {{{
 add_filter( 'get_comment_excerpt', 'my_comment_filter, 10, 3 );
 }}}

 Will continue to get the first 3 arguments that their add_filter() call
 specifies. If they want to get the new 4th argument, they would need to
 update their code to be:

 {{{
 add_filter( 'get_comment_excerpt', 'my_comment_filter, 10, 4 );
 }}}

 I've tested both variations locally with no errors. Let me know if I am
 missing something.

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


More information about the wp-trac mailing list