Skip to content

Instantly share code, notes, and snippets.

@caseydriscoll
Created August 8, 2014 15:50
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 caseydriscoll/1261f86abab554305b00 to your computer and use it in GitHub Desktop.
Save caseydriscoll/1261f86abab554305b00 to your computer and use it in GitHub Desktop.
Tribe: Change date format on Community Events Add form
// NOTE: This won't fully work, as the date format is changed back with javascript
// once the user selects a date with the date picker.
// Add this to your active theme's functions.php
add_filter( 'tribe_community_events_get_start_date', 'tribe_change_community_events_date_format' );
function tribe_change_community_events_date_format( $date, $event_id ) {
$date = date( 'y-m-d', strtotime( $date ) ); // change date configuration to desired
return $date;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment