Created
June 4, 2015 22:33
-
-
Save theeventscalendar/a0d6caf2849b6b584730 to your computer and use it in GitHub Desktop.
Hides event end times
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
// 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