Filter robots.txt output
git-svn-id: https://develop.svn.wordpress.org/trunk@13891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8d38a2f78e
commit
fedb70e678
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user