WP_Screen::is_block_editor()publicWP 5.0.0

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

{} Это метод класса: WP_Screen{}

Хуков нет.

Возвращает

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

Использование

$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.
По умолчанию: null

Список изменений

С версии 5.0.0 Введена.

Код WP_Screen::is_block_editor() WP 6.0.2

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

	return $this->is_block_editor;
}