WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Presentations

Indexable_Term_Archive_Presentation::generate_robots() public Yoast 1.0

Generates the robots value.

{} Это метод класса: Indexable_Term_Archive_Presentation{}

Хуков нет.

Возвращает

Массив. The robots value.

Использование

$Indexable_Term_Archive_Presentation = new Indexable_Term_Archive_Presentation();
$Indexable_Term_Archive_Presentation->generate_robots();

Код Indexable_Term_Archive_Presentation::generate_robots() Yoast 15.6.2

<?php
public function generate_robots() {
	$robots = $this->get_base_robots();

	/**
	 * If its a multiple terms archive page return a noindex.
	 */
	if ( $this->current_page->is_multiple_terms_page() ) {
		$robots['index'] = 'noindex';

		return $this->filter_robots( $robots );
	}

	/**
	 * First we get the no index option for this taxonomy, because it can be overwritten the indexable value for
	 * this specific term.
	 */
	if ( ! $this->taxonomy->is_indexable( $this->source->taxonomy ) ) {
		$robots['index'] = 'noindex';
	}

	/**
	 * Overwrite the index directive when there is a term specific directive set.
	 */
	if ( $this->model->is_robots_noindex !== null ) {
		$robots['index'] = ( $this->model->is_robots_noindex ) ? 'noindex' : 'index';
	}

	return $this->filter_robots( $robots );
}