Created
September 17, 2021 22:00
-
-
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
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
<?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