Make WordPress Core

Changeset 13194


Ignore:
Timestamp:
02/18/2010 10:57:49 AM (15 years ago)
Author:
dd32
Message:

Display robots.txt even on blogs with 0 posts on the home page. See #12256

File:
1 edited

Legend:

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

    r13187 r13194  
    474474        global $wp_query;
    475475
    476         if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
     476        if ( (0 == count($wp_query->posts)) && !is_404() && !is_robots() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
    477477            // Don't 404 for these queries if they matched an object.
    478478            if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) {
Note: See TracChangeset for help on using the changeset viewer.