[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 22:14:58 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       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The design I am currently working on has long comments shortened to 100
 words, and a 'show more' / 'show less' link is added.

 I only want to add the 'show more' text if the comment has been shortened.
 There is a filter before get_comment_excerpt() returns that I can use to
 add my link. However it does not pass along information about whether or
 not the comment was shortened.

 As a workaround I can check if the comment ends in "…", but it
 would make sense to add a boolean value to the filter arguments to make
 this easier/cleaner.

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


More information about the wp-trac mailing list