Filter
rpress_settings_export_filename
On this page
Filters the file name of the exported settings JSON file.
Runs when a settings export is downloaded. The default is rpress-settings-export- followed by the current UTC date in m-d-Y format. The .json extension is added after the filter, so return the name without an extension.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$filename | string | The file name without extension. |
Return value#
string. The file name, without the .json extension.
Example#
function my_settings_export_filename( $filename ) {
return sanitize_file_name( get_bloginfo( 'name' ) ) . '-restropress-settings';
}
add_filter( 'rpress_settings_export_filename', 'my_settings_export_filename' );
Notes#
The returned value is placed directly into a Content-Disposition header, so return a safe file name.
Source#
Applied in:
includes/admin/tools.php(line 885), inrpress_tools_import_export_process_export()
See also#
Was this page helpful?
