Tribe__Editor::are_blocks_enabled()

Utility function to check if blocks are enabled based on two assumptions

a) Is gutenberg active? 1) Via plugin or WP version b) Is the blocks editor active? 1) Based on the enqueue_block_assets action.


Return

(bool)


Top ↑

Source

File: src/Tribe/Editor.php

	public function are_blocks_enabled() {
		$gutenberg      = $this->is_gutenberg_active() || $this->is_wp_version();
		$blocks_enabled = $gutenberg && $this->is_blocks_editor_active();

		/**
		 * Filters whether the Blocks Editor is enabled or not.
		 *
		 * @since 4.14.13
		 *
		 * @param bool $should_load_blocks Whether the Blocks Editor is enabled or not.
		 */
		return (bool) apply_filters( 'tribe_editor_are_blocks_enabled', $blocks_enabled );
	}

Top ↑

Changelog

Changelog
Version Description
4.14.13 Introduced.