have_comments()
have_comments()
是否有要循环的注释。
Whether there are comments to loop over.
返回(Return)
(bool)
源码(Source)
/** * Whether there are comments to loop over. * * @since 2.2.0 * * @global WP_Query $wp_query * * @return bool */ function have_comments() { global $wp_query; return $wp_query->have_comments(); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.2.0 | wp-includes/query.php:986 | 0 | 1 function |
笔记(Notes)
基本示例
have_comments() 为WP2原创文章,链接:https://www.wp2.cn/functions/have_comments/