LLMS_Abstract_Exportable_Admin_Table::get_export_header()
Retrieve the header row for generating an export file
Return Return
(array)
Source Source
File: includes/abstracts/llms.abstract.exportable.admin.table.php
/**
* Retrieve the header row for generating an export file
*
* @since 3.15.0
* @since 3.17.3 Fixed SYLK warning generated when importing into Excel.
*
* @return array
*/
public function get_export_header() {
$cols = wp_list_pluck( $this->get_columns( 'export' ), 'title' );
/**
* If the first column is "ID" force it to lowercase
* to prevent Excel from attempting to interpret the .csv as SYLK
*
* @see https://github.com/gocodebox/lifterlms/issues/397
*/
foreach ( $cols as &$title ) {
if ( 'id' === strtolower( $title ) ) {
$title = strtolower( $title );
}
break;
}
/**
* Customize the export file header columns.
*
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.17.3 | Fixed SYLK warning generated when importing into Excel. |
| 3.15.0 | Introduced. |