Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_canonical()publicYoast 1.0

Generates the canonical.

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

Хуков нет.

Возвращает

Строку. The canonical.

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

$Indexable_Presentation = new Indexable_Presentation();
$Indexable_Presentation->generate_canonical();

Код Indexable_Presentation::generate_canonical() Yoast 20.0

public function generate_canonical() {
	if ( $this->model->canonical ) {
		return $this->model->canonical;
	}

	if ( $this->permalink ) {
		return $this->permalink;
	}

	return '';
}