Assets::should_enqueue_single_event_block_editor_styles()

Checks if we are on V2, on Event Single and if we are using the Block Editor in order to enqueue the block editor reskin styles for Single Event.


Return #

(boolean)


Top ↑

Source #

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

	public function should_enqueue_single_event_block_editor_styles() {
		// Bail if not Single Event V2.
		if ( ! tribe_events_single_view_v2_is_enabled() ) {
			return false;
		}

		// Bail if not Single Event.
		if ( ! tribe( Template_Bootstrap::class )->is_single_event() ) {
			return false;
		}

		// Bail if not Block Editor.
		if ( ! tribe( 'editor' )->is_events_using_blocks() && ! has_blocks( get_queried_object_id() ) ) {
			return false;
		}

		return true;
	}

Top ↑

Changelog #

Changelog
Version Description
5.10.0 Introduced.