LLMS_Abstract_Exportable_Admin_Table::get_export_file_name( array $args = array() )
Retrieves the file name for an export file.
Parameters Parameters
- $args
-
(array) (Optional) arguments passed from table to csv processor.
Default value: array()
Return Return
(string)
Source Source
File: includes/abstracts/llms.abstract.exportable.admin.table.php
* Retrieves the file name for an export file.
*
* @since 3.15.0
* @since 3.28.0 Unknown.
* @since 7.0.1 Fixed issue encountered when special characters are present in the table's title.
*
* @param array $args Optional arguments passed from table to csv processor.
* @return string
*/
public function get_export_file_name( $args = array() ) {
$parts = array(
sanitize_file_name( strtolower( $this->get_export_title( $args ) ) ),
_x( 'export', 'Used in export filenames', 'lifterlms' ),
llms_current_time( 'Y-m-d' ),
wp_generate_password( 8, false, false ),
);
$filename = implode( '_', $parts );
/**
* Filters the file name for an export file.
*
* The dynamic portion of this hook, `$this->id`, refers to the table's
* `$id` property.
*
* @since Unknown
* @since 7.0.1 Added the `$parts` and `$table` parameters.
*
* @param string $filename The generated filename.
* @param string[] $parts An array of strings that makeup the generated filename
* when joined with the underscore separator character.
* @param LLMS_Abstract_Exportable_Admin_Table $table Instance of the table object.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.0.1 | Fixed issue encountered when special characters are present in the table's title. |
| 3.28.0 | Unknown. |
| 3.15.0 | Introduced. |