gform_export_lines

gform_export_lines

DescriptionUsageParametersExamplePlacementSource CodeSince

Description
This filter can be used to allow the csv entry export lines to be filtered just before they are saved to the temporary file.
Usage
add_filter( 'gform_export_lines', 'your_function_name' );

Parameters

$lines string
The lines to be included in the .csv export.

Example
This example fixes an issue on Excel for Mac.
add_filter( 'gform_export_lines', 'fix_csv_entry_export' );
function fix_csv_entry_export ( $lines ) {
return mb_convert_encoding( $lines, 'UTF-16LE', 'UTF-8' );
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
$lines = apply_filters( 'gform_export_lines', $lines );

This filter is located in GFExport::start_export() in export.php.
Since
This filter was added in Gravity Forms 1.9.1.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注