cliffordp
8/17/2016 - 6:39 PM

Customize the Tribe Bar's datepicker caption text

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' );