Make WordPress Core

Changeset 13891


Ignore:
Timestamp:
03/30/2010 03:48:52 PM (15 years ago)
Author:
ryan
Message:

Filter robots.txt output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r13858 r13891  
    17761776    do_action( 'do_robotstxt' );
    17771777
    1778     if ( '0' == get_option( 'blog_public' ) ) {
    1779         echo "User-agent: *\n";
    1780         echo "Disallow: /\n";
     1778    $output = '';
     1779    $public = get_option( 'blog_public' );
     1780    if ( '0' ==  $public ) {
     1781        $output .= "User-agent: *\n";
     1782        $output .= "Disallow: /\n";
    17811783    } else {
    1782         echo "User-agent: *\n";
    1783         echo "Disallow:\n";
    1784     }
     1784        $output .= "User-agent: *\n";
     1785        $output .= "Disallow:\n";
     1786    }
     1787
     1788    echo apply_filters('robots_txt', $output, $public);
    17851789}
    17861790
Note: See TracChangeset for help on using the changeset viewer.