Created
August 4, 2015 05:33
-
-
Save elimn/13b32fb7763826df78d2 to your computer and use it in GitHub Desktop.
MT | TEC | Prevent iCal importer from saving a copy of "deleted" events
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 | |
/* | |
* Prevents iCal importer from saving a copy of "deleted" events | |
* This means when you rerun an import, it will reimport any events you previously deleted | |
*/ | |
function tribe_ical_dont_save_deleted () { | |
$ical_importer = Tribe__Events__Ical_Importer__Main::instance(); | |
remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) ); | |
} | |
add_action( 'wp_loaded', 'tribe_ical_dont_save_deleted' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment