Skip to content

Instantly share code, notes, and snippets.

@lelandf
Created September 17, 2021 22:00
Show Gist options
  • Save lelandf/3d5e1453de9221c8e4e4293c7787ecbd to your computer and use it in GitHub Desktop.
Save lelandf/3d5e1453de9221c8e4e4293c7787ecbd to your computer and use it in GitHub Desktop.
[TEC] Tame the multiday classes if you don't want them to actually appear like that
<?php
add_filter( 'tribe_events_views_v2_month_multiday_classes', function( $classes ) {
// Get rid of "width" class
$needle = "tribe-events-calendar-month__multiday-event--width-";
foreach ( $classes as $i => $haystack ) {
if ( 0 === strpos( $haystack, $needle ) ) {
unset( $classes[$i] );
}
}
// Ensure "end" class is present so there is a nice rounded courner
// Should perhaps check to make sure it's not already there but I guess no big deal to add it again
$end_class = "tribe-events-calendar-month__multiday-event--end";
$classes[] = $end_class;
return $classes;
}, 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment