Yoast\WP\SEO\Presentations

Indexable_Term_Archive_Presentation::generate_source()publicYoast 1.0

Generates the source.

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

Хуков нет.

Возвращает

Массив. The source.

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

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

Код Indexable_Term_Archive_Presentation::generate_source() Yoast 20.0

public function generate_source() {
	if ( ! empty( $this->model->object_id ) ) {
		return \get_term( $this->model->object_id, $this->model->object_sub_type );
	}

	return \get_term( \get_queried_object()->term_id, \get_queried_object()->taxonomy );
}