Skip to content
Docs
Get RestroPress

Filter

rpress_fooditem_history_export_filename

Updated
On this page

Filters the file name of the menu item history CSV export.

Runs when the menu item history CSV export sends its download headers. The value has no extension; .csv is appended afterwards. The default combines the export type with the month and year posted by the export form.

Parameters#

ParameterTypeDescription
$filenamestringDefault name: rpress-export-fooditem_history-{month}-{year}.

Return value#

string. The file name without the .csv extension.

Example#

function my_history_export_filename( $filename ) {
	return 'menu-' . $filename;
}
add_filter( 'rpress_fooditem_history_export_filename', 'my_history_export_filename', 10, 1 );

Source#

Applied in:

  • includes/admin/reporting/class-export-fooditem-history.php (line 42), in RPRESS_Fooditem_History_Export::headers()

See also#

Was this page helpful?