wp_robots

wp_robots

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_robots') is found 1 times:

  • /wp-includes/robots-template.php line 32
    	 * @param array $robots 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.
    	 */
    	$robots = apply_filters( 'wp_robots', array() );
    
    	$robots_strings = array();
    	foreach ( $robots as $directive => $value ) {
    		if ( is_string( $value ) ) {
    			// If a string value, include it as value for the directive.
    			$robots_strings[] = "{$directive}:{$value}";
    

See this hook used in plugins: