excerpt_length
apply_filters( ‘excerpt_length’, int $number )
过滤钩子:过滤文章摘要中的最大字数。
Filter Hook: Filters the maximum number of words in a post excerpt.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$number | (int) | 最大字数。违约55。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.7.0 | wp-includes/formatting.php:3819 | 1 | 0 |
笔记(Notes)
这将有助于仅在前端应用摘录长度。
通过定制器根据主题模式设置摘录长度。
excerpt_length 为WP2原创文章,链接:https://www.wp2.cn/hook/excerpt_length/