WordPress at a glance
filter is not described

wp_robots filter-hook . WP 5.7.0

Filters the directives to be included in the 'robots' meta tag.

The meta tag will only be included as necessary.

Usage

add_filter( 'wp_robots', 'filter_function_name_8282' );
function filter_function_name_8282( $robots ){
	// filter...

	return $robots;
}
$robots(array)
Associative array of directives. Every key must be the name of the directive, and the corresponding value must either be a string to provide as value for the directive or a boolean true if it is a boolean directive, i.e. without a value.

Changelog

Since 5.7.0 Introduced.

Where the hook is called

wp_robots()
wp_robots
wp-includes/robots-template.php 31
$robots = apply_filters( 'wp_robots', array() );

Where in WP core the hook is used WordPress

wp-activate.php 118
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
wp-includes/class-wp-customize-manager.php 1903
add_filter( 'wp_robots', 'wp_robots_no_robots' );
wp-includes/default-filters.php 240
add_filter( 'wp_robots', 'wp_robots_noindex' );
wp-includes/default-filters.php 241
add_filter( 'wp_robots', 'wp_robots_noindex_embeds' );
wp-includes/default-filters.php 242
add_filter( 'wp_robots', 'wp_robots_noindex_search' );
wp-includes/default-filters.php 243
add_filter( 'wp_robots', 'wp_robots_max_image_preview_large' );
wp-includes/default-filters.php 325
add_filter( 'wp_robots', 'wp_robots_no_robots' );
wp-includes/functions.php 3496
add_filter( 'wp_robots', 'wp_robots_no_robots' );
wp-login.php 45
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
wp-signup.php 6
add_filter( 'wp_robots', 'wp_robots_no_robots' );