Yoast\WP\SEO\Presentations
Indexable_Author_Archive_Presentation::generate_canonical()
Generates the canonical.
Метод класса: Indexable_Author_Archive_Presentation{}
Хуков нет.
Возвращает
Строку
. The canonical.
Использование
$Indexable_Author_Archive_Presentation = new Indexable_Author_Archive_Presentation(); $Indexable_Author_Archive_Presentation->generate_canonical();
Код Indexable_Author_Archive_Presentation::generate_canonical() Indexable Author Archive Presentation::generate canonical Yoast 23.5
public function generate_canonical() { if ( $this->model->canonical ) { return $this->model->canonical; } if ( ! $this->permalink ) { return ''; } $current_page = $this->pagination->get_current_archive_page_number(); if ( $current_page > 1 ) { return $this->pagination->get_paginated_url( $this->permalink, $current_page ); } return $this->permalink; }