Make WordPress Core


Ignore:
Timestamp:
05/22/2006 10:06:06 PM (20 years ago)
Author:
ryan
Message:

Handle robots.txt requests and obey blog_plubic setting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r3772 r3791  
    156156
    157157    return $wp_query->is_preview;
     158}
     159
     160function is_robots() {
     161    global $wp_query;
     162
     163    return $wp_query->is_robots;
    158164}
    159165
     
    273279    var $is_admin = false;
    274280    var $is_attachment = false;
     281    var $is_robots = false;
    275282
    276283    function init_query_flags() {
     
    293300        $this->is_admin = false;
    294301        $this->is_attachment = false;
     302        $this->is_robots = false;
    295303    }
    296304
     
    320328            $this->query = $query;
    321329            $this->query_vars = $qv;
     330        }
     331
     332        if ( ! empty($qv['robots']) ) {
     333            $this->is_robots = true;
     334            return;
    322335        }
    323336
Note: See TracChangeset for help on using the changeset viewer.