On this page
wp_use_widgets_block_editor(): bool
Whether or not to use the block editor to manage widgets. Defaults to true unless a theme has removed support for widgets-block-editor or a plugin has filtered the return value of this function.
Return
bool Whether to use the block editor to manage widgets.
Source
File: wp-includes/widgets.php. View all references
function wp_use_widgets_block_editor() {
/**
* Filters whether to use the block editor to manage widgets.
*
* @since 5.8.0
*
* @param bool $use_widgets_block_editor Whether to use the block editor to manage widgets.
*/
return apply_filters(
'use_widgets_block_editor',
get_theme_support( 'widgets-block-editor' )
);
}
Hooks
- apply_filters( 'use_widgets_block_editor',
bool $use_widgets_block_editor ) -
Filters whether to use the block editor to manage widgets.
Related
Uses
| Uses | Description |
|---|---|
| get_theme_support() wp-includes/theme.php | Gets the theme support arguments passed when registering that support. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| WP_Customize_Widgets::should_load_block_editor_scripts_and_styles() wp-includes/class-wp-customize-widgets.php | Tells the script loader to load the scripts and styles of custom blocks if the widgets block editor is enabled. |
| WP_Customize_Widgets::sanitize_widget_instance() wp-includes/class-wp-customize-widgets.php | Sanitizes a widget instance. |
| WP_Customize_Widgets::sanitize_widget_js_instance() wp-includes/class-wp-customize-widgets.php | Converts a widget instance into JSON-representable format. |
| WP_Customize_Widgets::enqueue_scripts() wp-includes/class-wp-customize-widgets.php | Enqueues scripts and styles for Customizer panel and export data to JavaScript. |
| WP_Customize_Widgets::customize_register() wp-includes/class-wp-customize-widgets.php | Registers Customizer settings and controls for all sidebars and widgets. |
Changelog
| Version | Description |
|---|---|
| 5.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor