Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #40482, comment 1


Ignore:
Timestamp:
04/19/2017 01:59:44 PM (7 years ago)
Author:
dougal
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40482, comment 1

    initial v1  
    44
    55By passing a long string through the `get_the_excerpt` and `get_excerpt` filters, you are simulating the case where you have entered the same long text into the `Excerpt` field in the `Edit Post` screen. When a custom excerpt is present in the `$post`, no trimming is done (though other content filters are applied).
     6
     7If you want to simulate the automatic excerpt trimming on arbitrary text from another source, then you need to pass it through `wp_trim_words()` yourself.
     8