mirror of
https://ghproxy.net/https://github.com/elementor/activity-log.git
synced 2025-10-03 22:37:02 +08:00
New: Added aal_export_csv_separator
filter to change the separator char (#193)
This commit is contained in:
parent
0f747b960b
commit
c159e822e7
1 changed files with 4 additions and 2 deletions
|
@ -34,12 +34,14 @@ class AAL_Exporter_csv {
|
|||
}
|
||||
|
||||
$fp = fopen( 'php://output', 'w' );
|
||||
|
||||
$separator = apply_filters( 'aal_export_csv_separator', ',' );
|
||||
|
||||
fputcsv( $fp, $columns );
|
||||
fputcsv( $fp, $columns, $separator );
|
||||
|
||||
foreach ( $data as $row ) {
|
||||
$encoded_row = $this->get_encoded_row( $row );
|
||||
fputcsv( $fp, $encoded_row );
|
||||
fputcsv( $fp, $encoded_row, $separator );
|
||||
}
|
||||
|
||||
fclose( $fp );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue