Filter
rpress_earnings_export_filename
On this page
Filters the file name of the earnings CSV export.
Runs when the earnings CSV export sends its download headers. The value has no extension; .csv is appended afterwards. The default combines the export type with the current month number and year.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$filename | string | Default name: rpress-export-earnings-{month}-{year}. |
Return value#
string. The file name without the .csv extension.
Example#
function my_earnings_export_filename( $filename ) {
return $filename . '-' . sanitize_title( get_bloginfo( 'name' ) );
}
add_filter( 'rpress_earnings_export_filename', 'my_earnings_export_filename', 10, 1 );
Source#
Applied in:
includes/admin/reporting/class-export-earnings.php(line 41), inRPRESS_Earnings_Export::headers()
See also#
Was this page helpful?
