From 0ba70bb459cec43c6613022bd7936945fbc7ab67 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 27 Mar 2007 16:44:36 +0000 Subject: [PATCH] Serve robots.txt as text/plain. Props JeremyVisser. fixes #4037 git-svn-id: https://develop.svn.wordpress.org/trunk@5117 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 501d29525c..b8993c4f48 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -982,7 +982,10 @@ function do_feed_atom($for_comments) { } function do_robots() { + header('Content-type: text/plain; charset=utf-8'); + do_action('do_robotstxt'); + if ( '0' == get_option('blog_public') ) { echo "User-agent: *\n"; echo "Disallow: /\n";