WP_Screen::is_block_editor() WordPress Method

The WP_Screen::is_block_editor() method is used to determine whether the current screen is the block editor.

WP_Screen::is_block_editor( bool $set = null ) #

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


Parameters

$set

(bool)(Optional) Sets whether the block editor is loading on the current screen or not.

Default value: null


Top ↑

Return

(bool) True if the block editor is being loaded, false otherwise.


Top ↑

Source

File: wp-admin/includes/class-wp-screen.php

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

		return $this->is_block_editor;
	}


Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.