LLMS_Admin_Table::get_columns( string $context = 'display' )
Retrieve the array of columns defined by set_columns.
Parameters Parameters
- $context
-
(string) (Optional) Display context [display|export].
Default value: 'display'
Return Return
(array)
Source Source
File: includes/abstracts/abstract.llms.admin.table.php
public function get_columns( $context = 'display' ) {
/**
* Filters the array of table columns.
*
* The dynamic portion of this filter `{$this->id}` refers to the unique ID for the table.
*
* @since 3.2.0
*
* @param array $columns The array of table columns.
* @param string $context Display context [display|export].
*/
$cols = apply_filters( "llms_table_get_{$this->id}_columns", $this->set_columns(), $context );
if ( $this->is_exportable ) {
foreach ( $cols as $id => $data ) {
if ( ! $this->is_col_visible( $data, $context ) ) {
unset( $cols[ $id ] );
}
}
}
return $cols;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.24.0 | Unknown. |
| 3.2.0 | Introduced. |