[wp-trac] [WordPress Trac] #53424: remove_theme_support doesn't restore back to classic widgets editor

WordPress Trac noreply at wordpress.org
Thu Jun 17 02:10:12 UTC 2021


#53424: remove_theme_support doesn't restore back to classic widgets editor
--------------------------+---------------------
 Reporter:  kevin940726   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.8
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by kevin940726):

 Replying to [comment:1 caseymilne]:
 > The hook `remove_theme_support( 'widgets-block-editor' )` only removes
 Widget Block Editor. Does it not do that?

 No, it doesn't do that in my testing.

 > Because the documentation appears to indicate we need to install the
 Classic Widgets Editor plugin separately to restore the class widgets
 editor.

 I believe this is not true though. The documentation indicates that one of
 the three methods mentioned should work independently.

 Testing instructions:

 1. Add `remove_theme_support( 'widgets-block-editor' )` to a theme in a
 `after_setup_theme` action.
 2. Go to Appearance -> Widgets.
 3. Should see the classic widgets editor rather than the widgets block
 editor.

 Replying to [comment:2 jamesros161]:

 > I have also tried using add_filter(
 'gutenberg_use_widgets_block_editor', '__return_false' ); according to the
 instructions here: https://developer.wordpress.org/block-editor/how-to-
 guides/widgets/opting-out/ but that doesn't work either.

 This doesn't work for me either. I believe this is a bug in the
 documentation. We need to update the filter to be `add_filter(
 'use_widgets_block_editor', '__return_false' );` instead, which works for
 me.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53424#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list