Yoast\WP\SEO\Presentations
Indexable_Post_Type_Presentation::generate_rel_next() public Yoast 1.0
Generates the rel next.
{} Это метод класса: Indexable_Post_Type_Presentation{}
Хуков нет.
Возвращает
Строку. The rel prev next.
Использование
$Indexable_Post_Type_Presentation = new Indexable_Post_Type_Presentation(); $Indexable_Post_Type_Presentation->generate_rel_next();
Код Indexable_Post_Type_Presentation::generate_rel_next() Indexable Post Type Presentation::generate rel next Yoast 15.6.2
public function generate_rel_next() {
if ( $this->model->number_of_pages === null ) {
return '';
}
if ( $this->pagination->is_rel_adjacent_disabled() ) {
return '';
}
$current_page = \max( 1, $this->pagination->get_current_post_page_number() );
if ( $this->model->number_of_pages <= $current_page ) {
return '';
}
return $this->get_paginated_url( $this->model->permalink, ( $current_page + 1 ) );
}