Automattic\WooCommerce\Blocks\BlockTypes
AbstractBlock::is_block_editor
Are we currently on the admin block editor screen?
Method of the class: AbstractBlock{}
No Hooks.
Returns
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->is_block_editor();
AbstractBlock::is_block_editor() AbstractBlock::is block editor code WC 9.8.5
protected function is_block_editor() { if ( ! is_admin() || ! function_exists( 'get_current_screen' ) ) { return false; } $screen = get_current_screen(); return $screen && $screen->is_block_editor(); }