WP_Screen::is_block_editor()
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 Screen::is block editor WP 6.5.2
public function is_block_editor( $set = null ) { if ( null !== $set ) { $this->is_block_editor = (bool) $set; } return $this->is_block_editor; }