WP_Customize_Widgets::filter_option_sidebars_widgets_for_theme_switch( array $sidebars_widgets )

Filters sidebars_widgets option for theme switch.


Description Description

When switching themes, the retrieve_widgets() function is run when the Customizer initializes, and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets option.

See also See also


Top ↑

Parameters Parameters

$sidebars_widgets

(array) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: wp-includes/class-wp-customize-widgets.php

	public function filter_option_sidebars_widgets_for_theme_switch( $sidebars_widgets ) {
		$sidebars_widgets                  = $GLOBALS['sidebars_widgets'];
		$sidebars_widgets['array_version'] = 3;
		return $sidebars_widgets;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.