WordPress at a glance

have_comments() WP 1.0

Whether there are comments to loop over.

Возвращает

true/false. True if comments are available, false if no more comments.

Works based on: WP_Query::have_comments()
1 time = 0.000001s = speed of light | 50000 times = 0.02s = speed of light | PHP 7.1.5, WP 4.9.2

No Hooks.

Usage

have_comments();

Notes

  • Global. WP_Query. $wp_query WordPress Query object.

Список изменений

С версии 2.2.0 Введена.

Code of have_comments() WP 5.5.1

wp-includes/query.php
<?php
function have_comments() {
	global $wp_query;
	return $wp_query->have_comments();
}

Related Functions

From tag: Comments

More from tag: Conditional tags (all)

More from category: Comments Loop

More from Template Tags: Comments

No comments
    Log In . Register