function my_picu_proof_file_content( $proof_file_content, $post_id ) {
$img_filenames = picu_get_approved_filenames( $post_id );
$img_filenames = explode( ' ', $img_filenames );
ob_start();
echo "\"Label\",\"Filename\"\n";
foreach( $img_filenames as $file ) {
echo "Proof,$file\n";
}
return ob_get_clean();
}
add_filter( 'picu_proof_file_content', 'my_picu_proof_file_content', 10, 2 );
function my_picu_proof_file_name( $filename, $post_id ) {
return 'proof.csv';
}
add_filter( 'picu_proof_file_name', 'my_picu_proof_file_name', 10, 2 );
Code language: PHP (php)