Yoast\WP\SEO\Helpers

Pagination_Helper::get_current_post_page_number()publicYoast 1.0

Returns the current page for paged post types.

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

Хуков нет.

Возвращает

int. The current post page.

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

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

Код Pagination_Helper::get_current_post_page_number() Yoast 20.0

public function get_current_post_page_number() {
	$wp_query = $this->wp_query_wrapper->get_main_query();

	return (int) $wp_query->get( 'page' );
}