Created
August 8, 2014 15:50
-
-
Save caseydriscoll/1261f86abab554305b00 to your computer and use it in GitHub Desktop.
Tribe: Change date format on Community Events Add form
This file contains hidden or 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
// 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