Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created August 17, 2016 18:39
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 cliffordp/0544be0570d6e395e284d3d568ca9a31 to your computer and use it in GitHub Desktop.
Save cliffordp/0544be0570d6e395e284d3d568ca9a31 to your computer and use it in GitHub Desktop.
Customize the Tribe Bar's datepicker caption text
<?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