[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:11:41 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):

 Hi @joyously thanks for looking at this. $use_ellipsis is a boolean
 already set by the get_comment_excerpt() function that is used to
 determine if the comment needs to be shortened, I am just passing its
 value to the filter at the end of the function.

 There are workarounds; I mentioned checking for the … at the end of
 the string as one possible workaround. Your idea of checking both string
 lengths could work as well. In my opinion both of these ideas are a bit
 cumbersome, especially if we already have a boolean value at our disposal,
 we just need to add it to the filter.

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


More information about the wp-trac mailing list