the_content

函数


the_content ( $more_link_text = null, $strip_teaser = false )
参数
  • (string)
    $more_link_text
    Optional. Content for when there is more text.
    Required:
    Default: null
  • (bool)
    $strip_teaser
    Optional. Strip teaser content before the more text. Default false.
    Required:
    Default: false
定义位置
  • wp-includes/post-template.php
    , line 245
引入
0.71
弃用

Displays the post content.

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;
}