WP_Screen::is_block_editor( bool $set = null )

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


Description Description


Parameters Parameters

$set

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

Default value: null


Top ↑

Return Return

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


Top ↑

Source Source

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

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

		return $this->is_block_editor;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.