WordPress at Your Fingertips
filter is not described

robots_txt filter-hook . WP 3.0.0

Filters the robots.txt output.

Usage

add_filter( 'robots_txt', 'filter_function_name_9059', 10, 2 );
function filter_function_name_9059( $output, $public ){
	// filter...

	return $output;
}
$output(string)
The robots.txt output.
$public(true|false)
Whether the site is considered "public".

Changelog

Since 3.0.0 Introduced.

Where the hook is called

do_robots()
robots_txt
wp-includes/functions.php 1678
echo apply_filters( 'robots_txt', $output, $public );

Where in WP core the hook is used WordPress

wp-includes/sitemaps/class-wp-sitemaps.php 78
add_filter( 'robots_txt', array( $this, 'add_robots' ), 0, 2 );