the_content()
the_content( string $more_link_text = null, bool $strip…
the_content( string $more_link_text = null, bool $strip_teaser = false )
显示帖子内容。
Display the post content.
显示帖子内容。
Display the post content.
目录锚点:#参数#源码#笔记
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $more_link_text | (string) | 有更多文本时的内容。 |
| $strip_teaser | (bool) | 脱衣挑逗内容之前更多的文字。默认值为false。 |
源码(Source)
/**
* Display the post content.
*
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
*/
function the_content( $more_link_text = null, $strip_teaser = false) {
$content = get_the_content( $more_link_text, $strip_teaser );
/**
* Filter the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]>', $content );
echo $content;
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 0.71 | wp-includes/post-template.php | 15 | 15 |
笔记(Notes)
覆盖存档/单页行为
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!