WordPress at Your Fingertips
function is not described

WP_Screen::is_block_editor() public WP 5.0.0

Sets or returns whether the block editor is loading on the current screen.

{} It's a method of the class: WP_Screen{}

No Hooks.

Return

true|false. True if the block editor is being loaded, false otherwise.

Usage

$WP_Screen = new WP_Screen();
$WP_Screen->is_block_editor( $set );
$set(true|false)
Sets whether the block editor is loading on the current screen or not.
Default: null

Changelog

Since 5.0.0 Introduced.

Code of WP_Screen::is_block_editor() WP 5.8.2

public function is_block_editor( $set = null ) {
	if ( null !== $set ) {
		$this->is_block_editor = (bool) $set;
	}

	return $this->is_block_editor;
}