From cb0854bfdb3ecac35fbcdecc7f81e1ae7e8c09e8 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Mar 2010 15:48:52 +0000 Subject: [PATCH] Filter robots.txt output git-svn-id: http://svn.automattic.com/wordpress/trunk@13891 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 751095f0f..9dee68fc7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1775,13 +1775,17 @@ function do_robots() { do_action( 'do_robotstxt' ); - if ( '0' == get_option( 'blog_public' ) ) { - echo "User-agent: *\n"; - echo "Disallow: /\n"; + $output = ''; + $public = get_option( 'blog_public' ); + if ( '0' == $public ) { + $output .= "User-agent: *\n"; + $output .= "Disallow: /\n"; } else { - echo "User-agent: *\n"; - echo "Disallow:\n"; + $output .= "User-agent: *\n"; + $output .= "Disallow:\n"; } + + echo apply_filters('robots_txt', $output, $public); } /**