[wp-trac] [WordPress Trac] #44475: wp_trim_excerpt does not trim text if you pass text in.

WordPress Trac noreply at wordpress.org
Thu Aug 16 21:57:27 UTC 2018


#44475: wp_trim_excerpt does not trim text if you pass text in.
--------------------------+------------------------------
 Reporter:  aubreypwd     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.9.6
 Severity:  normal        |  Resolution:  invalid
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by aubreypwd):

 This was a little dismissive. I'm not questioning if documentation is
 wrong or write, I'm saying that the expectation behind this function is
 misleading and inefficient. I would expect if I passed a function called
 `wp_trim_excerpt` some text it would trim what I sent it, or it would
 always, at least, return a trimmed something. Why pass text to a function
 that simply returns it back to me? It just makes no sense.

 Maybe it should return the generated text (trimmed) and the parameter
 should be deprecated since it does nothing except filter it.

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


More information about the wp-trac mailing list