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
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | /** * 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 * */ 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. |