Last active
June 2, 2017 13:07
-
-
Save slimndap/e6e9f7609ddddca23cd76ed482811c30 to your computer and use it in GitHub Desktop.
Changes the event date of Veezi films from 'FeatureStartTime' to 'PreShowStartTime'. For use with the Veezi for WordPress plugin (https://wp.theater/downloads/veezi-wordpress/).
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 | |
/** | |
* Changes the event date of Veezi films from 'FeatureStartTime' to 'PreShowStartTime'. | |
* | |
* @param array $event_args The current event arguments. | |
* @param object $veezi_event The event from the Veezi feed. | |
* @param int $production_id The ID of the parent production. | |
* @return array The updated event arguments. | |
*/ | |
function theregal_import_PreShowStartTime( $event_args, $veezi_event, $production_id ) { | |
$event_args['event_date'] = date('Y-m-d H:i:s', strtotime($veezi_event->PreShowStartTime)); | |
return $event_args; | |
} | |
add_filter( 'wpt/veezi/import/process_event/args', 'theregal_import_PreShowStartTime', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment