do_robotstxt

do_robotstxt

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

See hook in core

Displaying hooks found in version: wordpress-6.7.1

do_action('do_robotstxt') is found 1 times:

  • /wp-includes/functions.php line 1709
    	 * 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'] : '';