Changeset 47018 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 12/28/2019 09:18:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r46661 r47018 390 390 */ 391 391 public $is_robots = false; 392 393 /** 394 * Signifies whether the current query is for the favicon.ico file. 395 * 396 * @since 5.4.0 397 * @var bool 398 */ 399 public $is_favicon = false; 392 400 393 401 /** … … 479 487 $this->is_singular = false; 480 488 $this->is_robots = false; 489 $this->is_favicon = false; 481 490 $this->is_posts_page = false; 482 491 $this->is_post_type_archive = false; … … 745 754 if ( ! empty( $qv['robots'] ) ) { 746 755 $this->is_robots = true; 756 } elseif ( ! empty( $qv['favicon'] ) ) { 757 $this->is_favicon = true; 747 758 } 748 759 … … 958 969 } 959 970 960 if ( ! ( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) ) { 971 if ( ! ( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed 972 || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) 973 || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots || $this->is_favicon ) ) { 961 974 $this->is_home = true; 962 975 } … … 4008 4021 4009 4022 /** 4010 * Is the query for the robots file?4023 * Is the query for the robots.txt file? 4011 4024 * 4012 4025 * @since 3.1.0 … … 4016 4029 public function is_robots() { 4017 4030 return (bool) $this->is_robots; 4031 } 4032 4033 /** 4034 * Is the query for the favicon.ico file? 4035 * 4036 * @since 5.4.0 4037 * 4038 * @return bool 4039 */ 4040 public function is_favicon() { 4041 return (bool) $this->is_favicon; 4018 4042 } 4019 4043
Note: See TracChangeset
for help on using the changeset viewer.