WP_List_Table::get_pagenum()
Gets the current page number.
Return
(int)
Source
File: wp-admin/includes/class-wp-list-table.php
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 );
} Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_list_table/get_pagenum