A WordPress-centric search engine for devs and theme authors



wp_trim_words ›

Since3.3.0
Deprecatedn/a
apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text )
Parameters: (4)
  • (string) $text The trimmed text.
    Required: Yes
  • (int) $num_words The number of words to trim the text to. Default 55.
    Required: Yes
  • (string) $more An optional string to append to the end of the trimmed text, e.g. ….
    Required: Yes
  • (string) $original_text The text before it was trimmed.
    Required: Yes
Defined at:
Codex:

Filters the text content after words have been trimmed.





Source

return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );