_wp_sidebars_changed()WP 3.3.0

Handle sidebars config after theme change

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

null. Nothing (null).

Usage

_wp_sidebars_changed();

Notes

  • Global. Array. $sidebars_widgets

Changelog

Since 3.3.0 Introduced.

_wp_sidebars_changed() code WP 6.5.2

function _wp_sidebars_changed() {
	global $sidebars_widgets;

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

	retrieve_widgets( true );
}