Skip to content

Instantly share code, notes, and snippets.

@theeventscalendar
Created June 4, 2015 22:33
Show Gist options
  • Save theeventscalendar/a0d6caf2849b6b584730 to your computer and use it in GitHub Desktop.
Save theeventscalendar/a0d6caf2849b6b584730 to your computer and use it in GitHub Desktop.
Hides event end times
// Function to hide end time in list, map, photo, and single event view
// NOTE: This will only hide the end time for events that end on the same day
add_filter( 'tribe_events_event_schedule_details_formatting', 'remove_end_time', 10, 2);
function remove_end_time( $formatting_details ) {
$formatting_details['show_end_time'] = 0;
return $formatting_details;
}
// Function to hide end time in Week and Month View Tooltips
// NOTE: This will hide the end time in tooltips for ALL events, not just events that end on the same day
add_filter( 'tribe_events_template_data_array', 'remove_end_time_tooltips', 10, 3 );
function remove_end_time_tooltips( $json_array, $event, $additional ) {
$json_array['endTime'] = '';
return $json_array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment