Ticket #18465: 18465.2.patch
File 18465.2.patch, 770 bytes (added by , 14 years ago) |
---|
-
wp-includes/functions.php
1844 1844 1845 1845 do_action( 'do_robotstxt' ); 1846 1846 1847 $output = '';1847 $output = "User-agent: *\n"; 1848 1848 $public = get_option( 'blog_public' ); 1849 1849 if ( '0' == $public ) { 1850 $output .= "User-agent: *\n";1851 1850 $output .= "Disallow: /\n"; 1852 1851 } else { 1853 $output .= "User-agent: *\n"; 1854 $output .= "Disallow:\n"; 1852 $site_url = parse_url( site_url() ); 1853 $path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : ''; 1854 $output .= "Disallow: $path/wp-admin\n"; 1855 $output .= "Disallow: $path/wp-includes\n"; 1855 1856 } 1856 1857 1857 1858 echo apply_filters('robots_txt', $output, $public);