mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 07:35:39 +01:00
Default to empty array if sidebars_widgets is not set. Don't unset array_version if not set. fixes #8804 for 2.7
git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1d93a351d6
commit
445e8577ff
@ -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,7 +618,8 @@ function wp_get_sidebars_widgets($update = true) {
|
||||
update_option('sidebars_widgets', $sidebars_widgets);
|
||||
}
|
||||
|
||||
unset($sidebars_widgets['array_version']);
|
||||
if ( isset($sidebars_widgets['array_version']) )
|
||||
unset($sidebars_widgets['array_version']);
|
||||
|
||||
$sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets);
|
||||
return $sidebars_widgets;
|
||||
|
Loading…
Reference in New Issue
Block a user