Created
December 1, 2011 18:02
-
-
Save coryschires/1418618 to your computer and use it in GitHub Desktop.
calendar
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
/** | |
* Event Title | |
* | |
* Return an event's title with pseudo-breadcrumb if on a category | |
* | |
* @param bool $depth include linked title | |
* @return string title | |
* @since 2.0 | |
*/ | |
$page_titles_for_drop_menu = array("Family Advocacy Program", "Domestic Violence Awareness", "Resource Referral Program", "Empowerment Program", "Credit Counseling Program", "Central IL Men Against Domestic Abuse", "McLean County Coalition for Justice & Equality") | |
$current_index_of_page_title = 0 | |
function tribe_get_events_title( $depth = true ) { | |
$tribe_ecp = TribeEvents::instance(); | |
$title = __('Calendar of Events', 'tribe-events-calendar'); | |
if ( is_tax( $tribe_ecp->get_event_taxonomy() ) ) { | |
$cat = get_term_by( 'slug', get_query_var('term'), $tribe_ecp->get_event_taxonomy() ); | |
if ( $depth ) { | |
$title = '<a href="'.tribe_get_events_link().'">'.$title.'</a>'; | |
$title .= ' › ' . $cat->name; | |
} else { | |
$title = $page_titles_for_drop_menu[$current_index_of_page_title]; | |
} | |
} | |
$current_index_of_page_title = $current_index_of_page_title + 1; | |
return $title | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment