Skip to content

Instantly share code, notes, and snippets.

@slimndap
Last active June 2, 2017 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slimndap/e6e9f7609ddddca23cd76ed482811c30 to your computer and use it in GitHub Desktop.
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/).
<?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