wp_trim_words ( $text, $num_words = 55, $more = null )
- (string) $text Text to trim.
- (int) $num_words Number of words. Default 55.
- (string) $more Optional. What to append if $text needs to be trimmed. Default '…'.
- Introduced in WordPress: 3.3.0
- Deprecated in WordPress: —
Trims text to a certain number of words.
This function is localized. For languages that count 'words' by the individual
character (such as East Asian languages), the $num_words argument will apply
to the number of individual characters.