wp_trim_words filter-hook . WP 3.3.0
Filters the text content after words have been trimmed.
Usage
add_filter( 'wp_trim_words', 'filter_function_name_1642', 10, 4 ); function filter_function_name_1642( $text, $num_words, $more, $original_text ){ // filter... return $text; }
- $text(string)
- The trimmed text.
- $num_words(int)
- The number of words to trim the text to.
Default: 55 - $more(string)
- An optional string to append to the end of the trimmed text, e.g. ….
- $original_text(string)
- The text before it was trimmed.
Changelog
Since 3.3.0 | Introduced. |
Where the hook is called
wp_trim_words
wp-includes/formatting.php 3915
return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );