Access the pagination args.
Parameters
$keystringrequired- Pagination argument to retrieve. Common values include
'total_items','total_pages','per_page', or'infinite_scroll'.
Source
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;
}
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.