WP_List_Table::get_pagination_arg()publicWP 3.1.0

Access the pagination args.

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

Хуков нет.

Возвращает

int. Number of items that correspond to the given pagination argument.

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

$WP_List_Table = new WP_List_Table();
$WP_List_Table->get_pagination_arg( $key );
$key(строка) (обязательный)
Pagination argument to retrieve. Common values include 'total_items', 'total_pages', 'per_page', or 'infinite_scroll'.

Список изменений

С версии 3.1.0 Введена.

Код WP_List_Table::get_pagination_arg() WP 6.5.2

public function get_pagination_arg( $key ) {
	if ( 'page' === $key ) {
		return $this->get_pagenum();
	}

	if ( isset( $this->_pagination_args[ $key ] ) ) {
		return $this->_pagination_args[ $key ];
	}

	return 0;
}