Assets::should_enqueue_single_event()

Checks if we should enqueue event single assets.


Return

(bool) Whether the event single assets should be enqueued or not.


Top ↑

Source

File: src/Tribe/Assets.php

	public function should_enqueue_single_event() {
		if ( null !== $this->should_enqueue_single_event ) {
			return $this->should_enqueue_single_event;
		}

		$should_enqueue = tribe( Template_Bootstrap::class )->is_single_event();

		/**
		 * Allow filtering of where the event single assets will be loaded.
		 *
		 * @since 1.0.1
		 *
		 * @param bool $should_enqueue Whether the event single assets should be enqueued or not.
		 */
		$should_enqueue = apply_filters( 'tribe_events_virtual_assets_should_enqueue_single_event', $should_enqueue );

		$this->should_enqueue_single_event = $should_enqueue;

		return $should_enqueue;
	}

Top ↑

Changelog

Changelog
Version Description
1.0.1 Introduced.