wp_trim_excerpt WordPress Filter Hook
The wp_trim_excerpt hook is used to trim a post's excerpt to the desired length. It is useful for customizing the excerpt length on a per-post basis.
apply_filters( 'wp_trim_excerpt', string $text , string $raw_excerpt ) #
Filters the trimmed excerpt string.
Parameters
- $text
(string)The trimmed text.
- $raw_excerpt
(string)The text prior to trimming.
Source
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |