WP_List_Table::get_pagination_arg()publicWP 3.1.0

Access the pagination args.

Method of the class: WP_List_Table{}

No Hooks.

Return

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

Usage

$WP_List_Table = new WP_List_Table();
$WP_List_Table->get_pagination_arg( $key );
$key(string) (required)
Pagination argument to retrieve. Common values include 'total_items', 'total_pages', 'per_page', or 'infinite_scroll'.

Changelog

Since 3.1.0 Introduced.

WP_List_Table::get_pagination_arg() code WP 6.6.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;
}