Created
August 17, 2016 18:39
-
-
Save cliffordp/0544be0570d6e395e284d3d568ca9a31 to your computer and use it in GitHub Desktop.
Customize the Tribe Bar's datepicker caption text
This file contains 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 | |
// Customize the Tribe Bar's datepicker caption text | |
// override https://github.com/moderntribe/the-events-calendar/blob/4.2.4/src/Tribe/Main.php#L4229-L4266 | |
function cliff_custom_tribe_bar_datepicker_caption() { | |
$caption = 'Date'; | |
if ( tribe_is_month() ) { | |
$caption = 'My Custom Text'; | |
} elseif ( tribe_is_list_view() ) { | |
$caption = 'Events From'; | |
} elseif ( tribe_is_day() ) { | |
$caption = 'Day Of'; | |
} | |
return $caption; | |
} | |
add_filter( 'tribe_bar_datepicker_caption', 'cliff_custom_tribe_bar_datepicker_caption' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment