Title: wp_use_widgets_block_editor
Published: July 20, 2021
Last modified: May 20, 2026

---

# wp_use_widgets_block_editor(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#wp--skip-link--target)

Determines whether or not to use the block editor to manage widgets.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#description)󠁿

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](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#return)󠁿

 bool Whether to use the block editor to manage widgets.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#source)󠁿

    ```php
    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' )
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/widgets.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/widgets.php#L1908)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/widgets.php#L1908-L1920)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#hooks)󠁿

 [apply_filters( ‘use_widgets_block_editor’, bool $use_widgets_block_editor )](https://developer.wordpress.org/reference/hooks/use_widgets_block_editor/)

Filters whether to use the block editor to manage widgets.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#related)󠁿

| Uses | Description | 
| [get_theme_support()](https://developer.wordpress.org/reference/functions/get_theme_support/)`wp-includes/theme.php` |

Gets the theme support arguments passed when registering that support.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [WP_Customize_Widgets::should_load_block_editor_scripts_and_styles()](https://developer.wordpress.org/reference/classes/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()](https://developer.wordpress.org/reference/classes/wp_customize_widgets/sanitize_widget_instance/)`wp-includes/class-wp-customize-widgets.php` |

Sanitizes a widget instance.

  | 
| [WP_Customize_Widgets::sanitize_widget_js_instance()](https://developer.wordpress.org/reference/classes/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()](https://developer.wordpress.org/reference/classes/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()](https://developer.wordpress.org/reference/classes/wp_customize_widgets/customize_register/)`wp-includes/class-wp-customize-widgets.php` |

Registers Customizer settings and controls for all sidebars and widgets.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.8.0](https://developer.wordpress.org/reference/since/5.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_use_widgets_block_editor%2F)
before being able to contribute a note or feedback.