Changeset 37352
- Timestamp:
- 05/02/2016 11:41:18 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-widgets.php
r37279 r37352 1065 1065 */ 1066 1066 public function preview_sidebars_widgets( $sidebars_widgets ) { 1067 $sidebars_widgets = get_option( 'sidebars_widgets' );1067 $sidebars_widgets = get_option( 'sidebars_widgets', array() ); 1068 1068 1069 1069 unset( $sidebars_widgets['array_version'] ); -
trunk/tests/phpunit/tests/customize/widgets.php
r37166 r37352 97 97 $this->assertInstanceOf( 'WP_Customize_Widgets', $this->manager->widgets ); 98 98 $this->assertEquals( $this->manager, $this->manager->widgets->manager ); 99 } 100 101 /** 102 * Test registering sidebars without an extant sidebars_widgets option. 103 * 104 * @see WP_Customize_Widgets::customize_register() 105 * @see WP_Customize_Widgets::preview_sidebars_widgets() 106 * @ticket 36660 107 */ 108 function test_customize_register_with_deleted_sidebars() { 109 $sidebar_id = 'sidebar-1'; 110 delete_option( 'sidebars_widgets' ); 111 register_sidebar( array( 'id' => $sidebar_id ) ); 112 $this->manager->widgets->customize_register(); 113 $this->assertEquals( array_fill_keys( array( 'wp_inactive_widgets', $sidebar_id ), array() ), wp_get_sidebars_widgets() ); 99 114 } 100 115
Note: See TracChangeset
for help on using the changeset viewer.