Tribe__Events__Templates::load_ecp_into_page_template( $contents = '' )

Loads the contents into the page template

Contents


Return

(string) Page content


Top ↑

Source

File: src/Tribe/Templates.php

		public static function load_ecp_into_page_template( $contents = '' ) {
			// only run once!!!
			remove_filter( 'the_content', array( __CLASS__, 'load_ecp_into_page_template' ) );

			self::restoreQuery();

			ob_start();

			echo tribe_events_before_html();

			tribe_get_view();

			echo tribe_events_after_html();

			$contents = ob_get_clean();

			// make sure the loop ends after our template is included
			if ( ! is_404() ) {
				self::endQuery();
			}

			return $contents;
		}