wp_trim_excerpt
wp_trim_excerpt ( $text = '', $post = null )
Parameters:- (string) text Optional. The excerpt. If set to empty, an excerpt is generated.
- (WP_Post|object|int) post Optional. WP_Post instance or Post ID/object. Default null.
Returns:Defined at:Change Log: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Generates an excerpt from the content, if needed.Returns a maximum of 55 words with an ellipsis appended if necessary.
The 55-word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter
The ' […]' string can be modified by plugins/themes using the {@see 'excerpt_more'} filter