Filter robots.txt output
git-svn-id: http://svn.automattic.com/wordpress/trunk@13891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e2c3b87693
commit
cb0854bfdb
|
@ -1775,13 +1775,17 @@ function do_robots() {
|
||||||
|
|
||||||
do_action( 'do_robotstxt' );
|
do_action( 'do_robotstxt' );
|
||||||
|
|
||||||
if ( '0' == get_option( 'blog_public' ) ) {
|
$output = '';
|
||||||
echo "User-agent: *\n";
|
$public = get_option( 'blog_public' );
|
||||||
echo "Disallow: /\n";
|
if ( '0' == $public ) {
|
||||||
|
$output .= "User-agent: *\n";
|
||||||
|
$output .= "Disallow: /\n";
|
||||||
} else {
|
} else {
|
||||||
echo "User-agent: *\n";
|
$output .= "User-agent: *\n";
|
||||||
echo "Disallow:\n";
|
$output .= "Disallow:\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo apply_filters('robots_txt', $output, $public);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue