Make WordPress Core

Ticket #18465: 18465.patch

File 18465.patch, 650 bytes (added by SergeyBiryukov, 14 years ago)
  • wp-includes/functions.php

     
    18441844
    18451845        do_action( 'do_robotstxt' );
    18461846
    1847         $output = '';
     1847        $output = "User-agent: *\n";
    18481848        $public = get_option( 'blog_public' );
    18491849        if ( '0' ==  $public ) {
    1850                 $output .= "User-agent: *\n";
    18511850                $output .= "Disallow: /\n";
    18521851        } else {
    1853                 $output .= "User-agent: *\n";
    1854                 $output .= "Disallow:\n";
     1852                $output .= "Disallow: /wp-admin\n";
     1853                $output .= "Disallow: /wp-includes\n";
    18551854        }
    18561855
    18571856        echo apply_filters('robots_txt', $output, $public);