Last active
April 22, 2021 12:10
-
-
Save andrasguseo/be4ec0259c68ab3b1b6765b26efda568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 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