Changeset 51705 for trunk/src/wp-includes/class-wp-customize-widgets.php
- Timestamp:
- 08/31/2021 07:57:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-widgets.php
r51700 r51705 276 276 $this->manager->set_post_value( 'old_sidebars_widgets_data', $this->old_sidebars_widgets ); // Override any value cached in changeset. 277 277 278 // retrieve_widgets() looks at the global $sidebars_widgets.278 // sync_registered_widgets() looks at the global $sidebars_widgets. 279 279 $sidebars_widgets = $this->old_sidebars_widgets; 280 $sidebars_widgets = retrieve_widgets( 'customize' );280 $sidebars_widgets = sync_registered_widgets( 'customize' ); 281 281 add_filter( 'option_sidebars_widgets', array( $this, 'filter_option_sidebars_widgets_for_theme_switch' ), 1 ); 282 282 // Reset global cache var used by wp_get_sidebars_widgets(). … … 288 288 * 289 289 * When switching themes, filter the Customizer setting old_sidebars_widgets_data 290 * to supply initial $sidebars_widgets before they were overridden by retrieve_widgets().290 * to supply initial $sidebars_widgets before they were overridden by sync_registered_widgets(). 291 291 * The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets 292 292 * theme_mod. … … 306 306 * Filters sidebars_widgets option for theme switch. 307 307 * 308 * When switching themes, the retrieve_widgets() function is run when the Customizer initializes,308 * When switching themes, the sync_registered_widgets() function is run when the Customizer initializes, 309 309 * and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets 310 310 * option.
Note: See TracChangeset
for help on using the changeset viewer.