WP_Customize_Widgets::filter_customize_value_old_sidebars_widgets_data() WordPress Method

The WP_Customize_Widgets::filter_customize_value_old_sidebars_widgets_data() method is used to filter the data for a given sidebar widgets setting. This is used to ensure compatibility with the old sidebars widgets data structure.

WP_Customize_Widgets::filter_customize_value_old_sidebars_widgets_data( array $old_sidebars_widgets ) #

Filters old_sidebars_widgets_data Customizer setting.


Description

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.

Top ↑

See also


Top ↑

Parameters

$old_sidebars_widgets

(array)(Required)


Top ↑

Return

(array)


Top ↑

Source

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

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

Top ↑

Changelog

Changelog
VersionDescription
3.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More