wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_robots_noindex_embeds › WordPress Function

Since5.7.0
已弃用n/a
wp_robots_noindex_embeds ( $robots )
参数:
  • (array) $robots Associative array of robots directives.
    Required: Yes
查看:
返回:
  • (array) Filtered robots directives.
定义在:
文档:

Adds `noindex` to the robots meta tag for embeds.

Typical usage is as a {@see 'wp_robots'} callback: add_filter( 'wp_robots', 'wp_robots_noindex_embeds' );


源码

function wp_robots_noindex_embeds( array $robots ) {
	if ( is_embed() ) {
		return wp_robots_no_robots( $robots );
	}

	return $robots;
}