Default to empty array if sidebars_widgets is not set. Don't unset array_version if not set. fixes #8804 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@10314 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-01-05 23:03:17 +00:00
parent 67b4280125
commit 2719acb8ed
1 changed files with 3 additions and 2 deletions

View File

@ -548,7 +548,7 @@ function is_dynamic_sidebar() {
function wp_get_sidebars_widgets($update = true) {
global $wp_registered_widgets, $wp_registered_sidebars;
$sidebars_widgets = get_option('sidebars_widgets');
$sidebars_widgets = get_option('sidebars_widgets', array());
$_sidebars_widgets = array();
if ( !isset($sidebars_widgets['array_version']) )
@ -618,6 +618,7 @@ function wp_get_sidebars_widgets($update = true) {
update_option('sidebars_widgets', $sidebars_widgets);
}
if ( isset($sidebars_widgets['array_version']) )
unset($sidebars_widgets['array_version']);
$sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets);