Changes between Version 3 and Version 4 of Ticket #53816
- Timestamp:
- 07/28/2021 03:42:16 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #53816 – Description
v3 v4 5 5 There are a few problems there: 6 6 7 * We have multiple, closely related global variables (`$sidebars_widgets`+`$_wp_sidebars_widgets`, also`$wp_registered_widgets`, `$wp_registered_sidebars`). If we update one, we should also update the others for consistency. Sometimes we don't and we run into [https://github.com/WordPress/gutenberg/issues/33335#issuecomment-879903958 undefined behaviors].7 * We have multiple, closely related global variables (`$sidebars_widgets`+`$_wp_sidebars_widgets`, `$wp_registered_widgets`, `$wp_registered_sidebars`). If we update one, we should also update the others for consistency. Sometimes we don't and we run into [https://github.com/WordPress/gutenberg/issues/33335#issuecomment-879903958 undefined behaviors]. 8 8 * We use a function called `retrieve_widgets` as a mean to fix any discrepancies in the stored sidebar-to-widget mapping. It's called `retrieve`, but it actually does some writing. This is a source of confusion in itself so I [https://core.trac.wordpress.org/ticket/53811 proposed renaming it]. 9 9 * We [https://github.com/WordPress/wordpress-develop/pull/1433 we have to call retrieve_widgets in GET API endpoints] which makes it read-write, not read-only. This breaks HTTP caching and is also a [https://github.com/WordPress/gutenberg/issues/33335#issuecomment-879903958 source of bugs].