Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created November 29, 2016 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/3f56efe054c2d5dde50ea0104d605758 to your computer and use it in GitHub Desktop.
Save Pebblo/3f56efe054c2d5dde50ea0104d605758 to your computer and use it in GitHub Desktop.
This is an example plugin that contains a function to set the CSV delimiter to tabs rather than CSV.
<?php
/*
Plugin Name: Event Espresso Custom Functions Plugin
Description: Add custom functions for Event Espresso to this plugin.
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
//This function sets EE to use tabs for the CSV delimiter.
function tw_ee_csv_tab_delimiter() {
return "\t";
}
add_filter( 'FHEE__EE_CSV__fputcsv2__delimiter', 'tw_ee_csv_tab_delimiter' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment