WP_List_Table::get_pagenum()publicWP 3.1.0

Gets the current page number.

Method of the class: WP_List_Table{}

No Hooks.

Return

Int.

Usage

$WP_List_Table = new WP_List_Table();
$WP_List_Table->get_pagenum();

Changelog

Since 3.1.0 Introduced.

WP_List_Table::get_pagenum() code WP 6.4.3

public function get_pagenum() {
	$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;

	if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
		$pagenum = $this->_pagination_args['total_pages'];
	}

	return max( 1, $pagenum );
}