WordPress at a glance
function is not described

WP_Query::is_robots() public WP 3.1.0

Is the query for the robots.txt file?

Это метод класса: WP_Query{}

No Hooks.

Возвращает

true/false. Whether the query is for the robots.txt file.

Usage

$WP_Query = new WP_Query();
$WP_Query->is_robots();

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

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

Code of WP_Query::is_robots() WP 5.5.1

wp-includes/class-wp-query.php
<?php
public function is_robots() {
	return (bool) $this->is_robots;
}