have_comments

函数


have_comments ( No parameters )
返回值
  • (bool) True if comments are available, false if no more comments.
定义位置
  • wp-includes/query.php
    , line 1020
引入
2.2.0
弃用

确定当前的WordPress查询是否有评论可以循环使用。

function have_comments() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		return false;
	}

	return $wp_query->have_comments();
}