WP_Query::is_robots() WordPress Method
The WP_Query::is_robots() method allows you to check if the current query is for a robots file.
WP_Query::is_robots() #
Is the query for the robots.txt file?
Return
(bool) Whether the query is for the robots.txt file.
Source
File: wp-includes/class-wp-query.php
public function is_robots() { return (bool) $this->is_robots; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |