Core Function
View Source on Trac ↗ wp_html_excerpt()
wp_html_excerpt( mixed $str, mixed $count, mixed $more = null ) Safely extracts not more than the first $count characters from HTML string.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $str string | String to get the excerpt from. Required |
| $count int | Maximum number of characters to take. Required |
| $more string | Optional. What to append if $str needs to be trimmed. Defaults to empty string. |
Return Value
(string)
The excerpt.
Function Information
Since Version
2.5.0
Source File
wp-includes/formatting.php
Advertisement