Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2015 15:55
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 anonymous/615ed066f14e5b3f67e5 to your computer and use it in GitHub Desktop.
Save anonymous/615ed066f14e5b3f67e5 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'tribe_events_week_get_hours', 'filter_week_hours' );
function filter_week_hours( $hours ) {
$hour = 0;
foreach ( $hours as $key => $formatted_hour ) {
if ( $hour < 7 || $hour > 18 ) {
unset( $hours[ $hour ] );
}
$hour ++;
}
return $hours;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment