do_robotstxt

do_robotstxt

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('do_robotstxt') is found 1 times:

  • /wp-includes/functions.php line 1709
    1705
    1706
    1707
    1708
    1709
    1710
    1711
    1712
    1713
    1714
    1715
    * Fires when displaying the robots.txt file.
     *
     * @since 2.1.0
     */
    do_action( 'do_robotstxt' );
     
    $output = "User-agent: *\n";
    $public = get_option( 'blog_public' );
     
    $site_url = parse_url( site_url() );
    $path     = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : '';