Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

_wp_sidebars_changed() WordPress Function

The wp_sidebars_changed function is used to trigger a sidebar update. It is called when a sidebar is added, removed, or changed. This function includes two parameters: $old_sidebars and $new_sidebars. The $old_sidebars parameter is an array of the old sidebar data. The $new_sidebars parameter is an array of the new sidebar data.

_wp_sidebars_changed() #

Handle sidebars config after theme change


Source

File: wp-includes/widgets.php

function _wp_sidebars_changed() {
	global $sidebars_widgets;

	if ( ! is_array( $sidebars_widgets ) ) {
		$sidebars_widgets = wp_get_sidebars_widgets();
	}

	retrieve_widgets( true );
}


Top ↑

Changelog

Changelog
VersionDescription
3.3.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.