Handle robots.txt requests and obey blog_plubic setting.

git-svn-id: https://develop.svn.wordpress.org/trunk@3791 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-05-22 22:06:06 +00:00
parent 3bf0f5d94f
commit a868cae733
6 changed files with 37 additions and 4 deletions

View File

@@ -1655,6 +1655,16 @@ function do_feed_atom() {
load_template(ABSPATH . 'wp-atom.php');
}
function do_robots() {
if ( '1' != get_option('blog_public') ) {
echo "User-agent: *\n";
echo "Disallow: /\n";
} else {
echo "User-agent: *\n";
echo "Disallow:\n";
}
}
function is_blog_installed() {
global $wpdb;
$wpdb->hide_errors();