WP_Screen::is_block_editor
Sets or returns whether the block editor is loading on the current screen.
Method of the class: WP_Screen{}
No Hooks.
Returns
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. |
WP_Screen::is_block_editor() WP Screen::is block editor code WP 6.9.1
public function is_block_editor( $set = null ) {
if ( null !== $set ) {
$this->is_block_editor = (bool) $set;
}
return $this->is_block_editor;
}