Yoast\WP\SEO\Helpers

Pagination_Helper::get_number_of_archive_pages()publicYoast 1.0

Gets the number of archive pages.

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

Хуков нет.

Возвращает

int. The number of archive pages.

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

$Pagination_Helper = new Pagination_Helper();
$Pagination_Helper->get_number_of_archive_pages();

Код Pagination_Helper::get_number_of_archive_pages() Yoast 19.2

public function get_number_of_archive_pages() {
	$wp_query = $this->wp_query_wrapper->get_query();

	return (int) $wp_query->max_num_pages;
}