芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/src/presentations/archive-adjacent-trait.php
pagination = $pagination; } /** * Generates the rel prev. * * @return string */ public function generate_rel_prev() { if ( $this->pagination->is_rel_adjacent_disabled() ) { return ''; } $current_page = \max( 1, $this->pagination->get_current_archive_page_number() ); // Check if there is a previous page. if ( $current_page === 1 ) { return ''; } // Check if the previous page is the first page. if ( $current_page === 2 ) { return $this->permalink; } return $this->pagination->get_paginated_url( $this->permalink, ( $current_page - 1 ) ); } /** * Generates the rel next. * * @return string */ public function generate_rel_next() { if ( $this->pagination->is_rel_adjacent_disabled() ) { return ''; } $current_page = \max( 1, $this->pagination->get_current_archive_page_number() ); if ( $this->pagination->get_number_of_archive_pages() <= $current_page ) { return ''; } return $this->pagination->get_paginated_url( $this->permalink, ( $current_page + 1 ) ); } }