Assets::should_enqueue_frontend()

Checks if we should enqueue frontend assets for the V2 views.


Return

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


Top ↑

Source

File: src/Tribe/Assets.php

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

		$should_enqueue = tribe_events_views_v2_is_enabled() && tribe( Template_Bootstrap::class )->should_load();

		/**
		 * Allow filtering of where the base Frontend Assets will be loaded.
		 *
		 * @since 1.0.0
		 *
		 * @param bool $should_enqueue Whether the frontend assets should be enqueued or not.
		 */
		$should_enqueue = apply_filters( 'tribe_events_virtual_assets_should_enqueue_frontend', $should_enqueue );

		$this->should_enqueue_frontend = $should_enqueue;

		return $should_enqueue;
	}

Top ↑

Changelog

Changelog
Version Description
1.0.0 Introduced.