Changeset 41673
- Timestamp:
- 10/02/2017 06:10:06 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r41597 r41673 691 691 692 692 if ( is_array( $_sidebars_widgets ) ) { 693 set_theme_mod( 'sidebars_widgets', $_sidebars_widgets);693 set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $_sidebars_widgets ) ); 694 694 } 695 695 -
trunk/src/wp-includes/widgets.php
r41594 r41673 1287 1287 // Sidebars_widgets settings from when this theme was previously active. 1288 1288 $old_sidebars_widgets = get_theme_mod( 'sidebars_widgets' ); 1289 $old_sidebars_widgets = $old_sidebars_widgets['data']; 1289 1290 1290 1291 if ( is_array( $old_sidebars_widgets ) ) { -
trunk/tests/phpunit/tests/widgets.php
r41594 r41673 714 714 // Test restoring sidebars widgets when previously activated. 715 715 set_theme_mod( 'sidebars_widgets', array( 716 'sidebar-1' => array( 'tag_cloud-1' ), 717 'sidebar-2' => array(), 718 'sidebar-3' => array( 'unregistered_widget-1', 'text-1', 'media_image-1' ), 719 'orphaned_widgets_1' => array( 'media_video-2' ), 716 'time' => time(), 717 'data' => array( 718 'sidebar-1' => array( 'tag_cloud-1' ), 719 'sidebar-2' => array(), 720 'sidebar-3' => array( 'unregistered_widget-1', 'text-1', 'media_image-1' ), 721 'orphaned_widgets_1' => array( 'media_video-2' ), 722 ), 720 723 ) ); 721 724
Note: See TracChangeset
for help on using the changeset viewer.