Filter hook 'use_widgets_block_editor'

in WP Core File wp-includes/widgets.php at line 1902

View Source

use_widgets_block_editor

Filter Hook
Description
Filters whether to use the block editor to manage widgets.

Hook Information

File Location wp-includes/widgets.php View on GitHub
Hook Type Filter
Line Number 1902

Hook Parameters

Type Name Description
bool $use_widgets_block_editor Whether to use the block editor to manage widgets.

Usage Examples

Basic Usage
<?php
// Hook into use_widgets_block_editor
add_filter('use_widgets_block_editor', 'my_custom_filter', 10, 1);

function my_custom_filter($use_widgets_block_editor) {
    // Your custom filtering logic here
    return $use_widgets_block_editor;
}

Source Code Context

wp-includes/widgets.php:1902 - How this hook is used in WordPress core
<?php
1897  	 *
1898  	 * @since 5.8.0
1899  	 *
1900  	 * @param bool $use_widgets_block_editor Whether to use the block editor to manage widgets.
1901  	 */
1902  	return apply_filters(
1903  		'use_widgets_block_editor',
1904  		get_theme_support( 'widgets-block-editor' )
1905  	);
1906  }
1907  

PHP Documentation

<?php
/**
	 * 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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/widgets.php
Related Hooks

Related hooks will be displayed here in future updates.