/** * Current Template * * Get the current page template that we are on * * @todo Update the function name to ensure there are no namespace conflicts. * @return string Page template */ function tribe_get_current_template() { return apply_filters('tribe_get_current_template', TribeEventsTemplates::get_current_page_template()); }
public static function load_ecp_into_page_template() { // only run once!!! remove_filter('the_content', array(__CLASS__, 'load_ecp_into_page_template')); // restore the query so that our page template can do a normal loop self::restoreQuery(); ob_start(); echo apply_filters('tribe_events_before_html', stripslashes(tribe_get_option('tribeEventsBeforeHTML'))); include TribeEventsTemplates::get_current_page_template(); echo apply_filters('tribe_events_after_html', stripslashes(tribe_get_option('tribeEventsAfterHTML'))); $contents = ob_get_contents(); ob_end_clean(); // spoof the query again because not all of our templates make use of the loop self::endQuery(); return $contents; }