use_widgets_block_editor
Filters whether to use the block editor to manage widgets.
Usage
add_filter( 'use_widgets_block_editor', 'wp_kama_use_widgets_block_editor_filter' ); /** * Function for `use_widgets_block_editor` filter-hook. * * @param bool $use_widgets_block_editor Whether to use the block editor to manage widgets. * * @return bool */ function wp_kama_use_widgets_block_editor_filter( $use_widgets_block_editor ){ // filter... return $use_widgets_block_editor; }
- $use_widgets_block_editor(true|false)
- Whether to use the block editor to manage widgets.
Changelog
Since 5.8.0 | Introduced. |
Where the hook is called
use_widgets_block_editor
wp-includes/widgets.php 1902-1905
return apply_filters( 'use_widgets_block_editor', get_theme_support( 'widgets-block-editor' ) );