wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_set_sidebars_widgets › WordPress Function

Since2.2.0
Deprecatedn/a
wp_set_sidebars_widgets ( $sidebars_widgets )
Access:
  • private
Parameters:
  • (array) $sidebars_widgets Sidebar widgets and their settings.
    Required: Yes
Defined at:
Codex:

Set the sidebar widget option to update sidebars.



Source

function wp_set_sidebars_widgets( $sidebars_widgets ) {
	global $_wp_sidebars_widgets;

	// Clear cached value used in wp_get_sidebars_widgets().
	$_wp_sidebars_widgets = null;

	if ( ! isset( $sidebars_widgets['array_version'] ) ) {
		$sidebars_widgets['array_version'] = 3;
	}

	update_option( 'sidebars_widgets', $sidebars_widgets );
}