On this page
apply_filters( 'wp_trim_words', string $text, int $num_words, string $more, string $original_text )
Filters the text content after words have been trimmed.
Parameters
$textstring-
The trimmed text.
$num_wordsint-
The number of words to trim the text to. Default 55.
$morestring-
An optional string to append to the end of the trimmed text, e.g. ….
$original_textstring-
The text before it was trimmed.
Source
File: wp-includes/formatting.php. View all references
return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );
Related
Used By
| Used By | Description |
|---|---|
| wp_trim_words() wp-includes/formatting.php | Trims text to a certain number of words. |
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_trim_words