函数原型
have_comments(): bool
函数描述
Determines whether current WordPress query has comments to loop over.
是否弃用
未弃用
函数参数
无
函数返回值
bool True if comments are available, false if no more comments.
函数位置
File: wp-includes/query.php.
函数源码
function have_comments() {
global $wp_query;
if ( ! isset( $wp_query ) ) {
return false;
}
return $wp_query->have_comments();
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |

