Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Created April 19, 2019 19:37
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 barryhughes/59f9b91137c77fe7ac43241a7c4226fa to your computer and use it in GitHub Desktop.
Save barryhughes/59f9b91137c77fe7ac43241a7c4226fa to your computer and use it in GitHub Desktop.
<?php
function community_events_12hr_time() {
return 'g:i a';
}
function setup_time_option_filter() {
add_action( 'pre_option_time_format', 'community_events_12hr_time' );
}
function teardown_time_option_filter() {
remove_action( 'pre_option_time_format', 'community_events_12hr_time' );
}
add_action( 'tribe_events_community_section_before_datetime', 'setup_time_option_filter' );
add_action( 'tribe_events_community_section_after_datetime', 'teardown_time_option_filter' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment