Last active
March 30, 2018 05:15
-
-
Save cliffordp/f2045efa4b19b39d1b52db5d072b85a7 to your computer and use it in GitHub Desktop.
The Events Calendar: Event Aggregator: Never import any Venues.
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 | |
/** | |
* The Events Calendar: Event Aggregator: Never import any Venues. | |
* | |
* @see Tribe__Events__Aggregator__Record__Abstract::insert_posts() | |
* | |
* @link https://gist.github.com/cliffordp/f2045efa4b19b39d1b52db5d072b85a7 | |
*/ | |
function cliff_ea_do_not_import_venues( $items, $meta ) { | |
foreach ( $items as $item ) { | |
if ( ! empty( $item->venue ) ) { | |
unset( $item->venue ); | |
} | |
} | |
return $items; | |
} | |
add_filter( 'tribe_aggregator_before_insert_posts', 'cliff_ea_do_not_import_venues', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment