Widgets: Revert format of sidebars_widgets.

Restores the data format of the `sidebars_widgets` theme mod to its pre [41555]
format. It can trigger PHP warnings after switching themes if that mod has not
been removed previously.

Fixes #39693.



git-svn-id: https://develop.svn.wordpress.org/trunk@41673 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland
2017-10-02 18:10:06 +00:00
parent 32a6ac3918
commit 4666f2fd39
3 changed files with 9 additions and 5 deletions

View File

@@ -690,7 +690,7 @@ function switch_theme( $stylesheet ) {
}
if ( is_array( $_sidebars_widgets ) ) {
set_theme_mod( 'sidebars_widgets', $_sidebars_widgets );
set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $_sidebars_widgets ) );
}
$nav_menu_locations = get_theme_mod( 'nav_menu_locations' );