LLMS_Table_Students::parse_args( array $args = array() )
Parse arguments passed to get_results() method & setup table class variables.
Parameters Parameters
- $args
-
(array) (Optional) Array of arguments.
Default value: array()
Return Return
(void)
Source Source
File: includes/admin/reporting/tables/llms.table.students.php
protected function parse_args( $args = array() ) {
if ( ! $args ) {
$args = $this->get_args();
}
$args = $this->clean_args( $args );
if ( isset( $args['page'] ) ) {
$this->current_page = absint( $args['page'] );
}
$this->order = isset( $args['order'] ) ? $args['order'] : $this->get_order();
$this->orderby = isset( $args['orderby'] ) ? $args['orderby'] : $this->get_orderby();
$this->per_page = isset( $args['per_page'] ) ? $args['per_page'] : $this->get_per_page();
if ( $this->is_filterable ) {
$this->filterby = isset( $args['filterby'] ) ? $args['filterby'] : $this->get_filterby();
$this->filter = isset( $args['filter'] ) ? $args['filter'] : $this->get_filter();
}
if ( isset( $args['search'] ) ) {
$this->search = $args['search'];
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.31.0 | Added logic to parse 'filterby' and 'filter' args when this table is filterable. |
| 3.28.0 | Introduced. |