Tribe__Editor::is_events_using_blocks()
Whether the TEC setting dictates Blocks or the Classic Editor.
used in ET, ET+ and TEC
Return
(bool) True if using Blocks. False if using the Classic Editor.
Source
File: src/Tribe/Editor.php
public function is_events_using_blocks() { /** * Whether the event is being served through blocks * or the classical editor. * * @since 4.12.0 * * @param bool $is_using_blocks True if using blocks. False if using the classical editor. */ $is_using_blocks = apply_filters( 'tribe_is_using_blocks', null ); // Early bail: The filter was overridden to return either true or false. if ( null !== $is_using_blocks ) { return $is_using_blocks; } // Early bail: The site itself is not using blocks. if ( ! $this->should_load_blocks() ) { return false; } return tribe_is_truthy( tribe_get_option( 'toggle_blocks_editor' ) ); }
Changelog
Version | Description |
---|---|
4.12.0 | Introduced. |