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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-02-18 10:57:49 +00:00
parent 481737b4ae
commit 4f460639c8
1 changed files with 1 additions and 1 deletions

View File

@ -473,7 +473,7 @@ class WP {
function handle_404() {
global $wp_query;
if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
if ( (0 == count($wp_query->posts)) && !is_404() && !is_robots() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
// Don't 404 for these queries if they matched an object.
if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) {
if ( !is_404() )