Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Skeleton code for modifying imported event content
add_action( 'tribe_aggregator_before_insert_posts', 'add_wp_content_filter' );
function add_wp_content_filter() {
add_filter( 'wp_insert_post_data', 'filter_post_data' );
function filter_post_data( $data ) {
// Do stuff here
// Return data
return $data;
add_action( 'tribe_aggregator_after_insert_posts', 'remove_ea_filters' );
function remove_ea_filters() {
remove_action( 'tribe_aggregator_before_insert_posts', 'add_wp_content_filter' );
remove_action( 'tribe_aggregator_after_insert_posts', 'remove_ea_filters' );
remove_filter( 'wp_insert_post_data', 'filter_post_data' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment