[wp-trac] [WordPress Trac] #57531: Store legacy sidebars when switching to a block theme

WordPress Trac noreply at wordpress.org
Mon Jan 23 13:50:24 UTC 2023


#57531: Store legacy sidebars when switching to a block theme
-------------------------+-----------------------------
 Reporter:  Mamaduka     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Widgets      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 == Why

 Recently Block Editor introduced a feature to import widgets into template
 parts. This pathway allows migration to a block theme without losing the
 widgets.

 Storing legacy sidebars provides a better user experience when using this
 feature.

 == How

 * If a user is switching to a block theme. Previously registered sidebars
 are stored in the `wp_legacy_sidebars` theme mod.
 * Later, this data is used to register legacy sidebars for a block theme
 without enabling Widgets support. The sidebars are only available via REST
 API and are marked as inactive.
 * The legacy sidebar registration is required to avoid remapping
 "orphaned" widgets to the `wp_inactive_widgets` sidebar.

 For more details, see the corresponding Gutenberg PR -
 https://github.com/WordPress/gutenberg/pull/45509.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57531>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list