[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 08:23:22 UTC 2021


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

Comment (by Mamaduka):

 I think the initial placement of `add_theme_support( 'widgets-block-
 editor' )` was correct, and we need to update our docs to use
 `widgets_init` instead of `after_setup_theme`.

 The widgets support is added via `register_sidebar`, so doing something
 like this won't work as well:


 {{{#!php
 <?php
 add_action( 'after_setup_theme', function() {
         remove_theme_support( 'core-block-patterns' );
 } );
 }}}

 I think themes can decide if they want to use the new Widget Block Editor
 when registering widget areas.

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


More information about the wp-trac mailing list