WP_Query::have_comments() public WP 2.2.0
Whether there are more comments available.
Automatically rewinds comments when finished.
{} Это метод класса: WP_Query{}
Хуков нет.
Возвращает
true/false. True if comments are available, false if no more comments.
Использование
global $wp_query; $wp_query->have_comments();
Список изменений
С версии 2.2.0 | Введена. |
Код WP_Query::have_comments() WP Query::have comments WP 5.6.2
public function have_comments() {
if ( $this->current_comment + 1 < $this->comment_count ) {
return true;
} elseif ( $this->current_comment + 1 == $this->comment_count ) {
$this->rewind_comments();
}
return false;
}