From 3f7cbb9ef146f5a82e7ef8517948414dac4c2c11 Mon Sep 17 00:00:00 2001 From: Oscar Arzola Date: Fri, 23 Jul 2021 09:34:28 -0500 Subject: [PATCH] Use classic widgets in WP 5.8 (#270) --- inc/actions/namespace.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/actions/namespace.php b/inc/actions/namespace.php index 2aa70c6..6b10528 100644 --- a/inc/actions/namespace.php +++ b/inc/actions/namespace.php @@ -95,6 +95,13 @@ function setup() { // Add shortcode buttons. add_action( 'init', __NAMESPACE__ . '\register_shortcode_buttons' ); + + remove_theme_support( 'widgets-block-editor' ); + + // Disables the block editor from managing widgets in the Gutenberg plugin. + add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' ); + // Disables the block editor from managing widgets. + add_filter( 'use_widgets_block_editor', '__return_false' ); } /**