Template_Bootstrap::is_single_event()

Determines whether we are in a Single event page or not, base only on global context.


Return

(bool) Whether the current request is for the single event template or not.


Top ↑

Source

File: src/Tribe/Views/V2/Template_Bootstrap.php

	public function is_single_event() {
		$conditions = [
			is_singular( TEC::POSTTYPE ),
			'single-event' === tribe_context()->get( 'view' ),
		];

		$is_single_event = in_array( true, $conditions );

		return $is_single_event;
	}

Top ↑

Changelog

Changelog
Version Description
4.9.11 Introduced.