Yoast\WP\SEO\Integrations\Front_End
Indexing_Controls::register_hooks() public Yoast 1.0
Initializes the integration.
This is the place to register hooks and filters.
{} Это метод класса: Indexing_Controls{}
Хуков нет.
Возвращает
null.
Использование
$Indexing_Controls = new Indexing_Controls(); $Indexing_Controls->register_hooks();
Код Indexing_Controls::register_hooks() Indexing Controls::register hooks Yoast 15.6.2
public function register_hooks() {
// The option `blog_public` is set in Settings > Reading > Search Engine Visibility.
if ( (string) \get_option( 'blog_public' ) === '0' ) {
\add_filter( 'wpseo_robots_array', [ $this->robots, 'set_robots_no_index' ] );
}
\add_action( 'template_redirect', [ $this, 'noindex_robots' ] );
\add_filter( 'loginout', [ $this, 'nofollow_link' ] );
\add_filter( 'register', [ $this, 'nofollow_link' ] );
// Remove actions that we will handle through our wpseo_head call, and probably change the output of.
\remove_action( 'wp_head', 'rel_canonical' );
\remove_action( 'wp_head', 'index_rel_link' );
\remove_action( 'wp_head', 'start_post_rel_link' );
\remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
\remove_action( 'wp_head', 'noindex', 1 );
}