显示帖子内容。
原型
the_content( string $more_link_text = null, bool $strip_teaser = false )
参数
$more_link_text
(string)
(Optional)
当有更多文本时的内容。
$strip_teaser
(bool)
(Optional)
在更多文本之前删除预告片内容。默认值为false。
源文件
路径:wp-includes/post-template.php
<?php
...
function the_content( $more_link_text = null, $strip_teaser = false) {
$content = get_the_content( $more_link_text, $strip_teaser );
/**
* Filters 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;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/the_content/