WordPress at a glance
function is not described

WP_Customize_Widgets::filter_customize_value_old_sidebars_widgets_data() public WP 3.9.0

Filters old_sidebars_widgets_data Customizer setting.

When switching themes, filter the Customizer setting old_sidebars_widgets_data to supply initial $sidebars_widgets before they were overridden by retrieve_widgets(). The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets theme_mod.

{} It's a method of the class: WP_Customize_Widgets{}

No Hooks.

Return

Array.

Usage

$WP_Customize_Widgets = new WP_Customize_Widgets();
$WP_Customize_Widgets->filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets );
$old_sidebars_widgets(array) (required)

Notes

  • See: WP_Customize_Widgets::handle_theme_switch()

Changelog

Since 3.9.0 Introduced.

Code of WP_Customize_Widgets::filter_customize_value_old_sidebars_widgets_data() WP 5.5.3

<?php
public function filter_customize_value_old_sidebars_widgets_data( $old_sidebars_widgets ) {
	return $this->old_sidebars_widgets;
}