Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_permalink()publicYoast 1.0

Gets the permalink from the indexable or generates it if dynamic permalinks are enabled.

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

Хуков нет.

Возвращает

Строку. The permalink.

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

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

Код Indexable_Presentation::generate_permalink() Yoast 19.7.1

public function generate_permalink() {
	if ( $this->indexable_helper->dynamic_permalinks_enabled() ) {
		return $this->permalink_helper->get_permalink_for_indexable( $this->model );
	}

	if ( \is_date() ) {
		return $this->current_page->get_date_archive_permalink();
	}

	return $this->model->permalink;
}