Tribe__Events__Community__Main::default_template_compatibility( bool $print_before_after_override = false )

Used to ensure that CE views function when the Default Events Template is in use.

We could consider using a template class at some future point, right now this provides a light functional means of letting users choose the Default Events Template for CE views.


Parameters

$print_before_after_override

(bool) (Optional) Whether before and after HTML should be printed on the page in any case (true) or that should be instead a consequence of the context.

Default value: false


Top ↑

Source

File: src/Tribe/Main.php

		public function default_template_compatibility( $print_before_after_override = false ) {
			add_filter( 'tribe_events_current_view_template', array( $this, 'default_template_placeholder' ) );
			tribe_asset_enqueue_group( 'events-styles' );

			if ( false === $print_before_after_override && '' === tribe_get_option( 'tribeEventsTemplate', '' ) ) {
				$this->should_print_before_after_html = false;
			} else {
				$this->should_print_before_after_html = true;
			}
		}