Yoast\WP\SEO\Presentations

Indexable_Post_Type_Archive_Presentation::generate_robots()publicYoast 1.0

Generates the robots value.

Метод класса: Indexable_Post_Type_Archive_Presentation{}

Хуков нет.

Возвращает

Массив. The robots value.

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

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

Код Indexable_Post_Type_Archive_Presentation::generate_robots() Yoast 22.4

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

	if ( $this->options->get( 'noindex-ptarchive-' . $this->model->object_sub_type, false ) ) {
		$robots['index'] = 'noindex';
	}

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