From ea4528dc43bb32151e608f1b25f042c2193abb6d Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Mon, 24 Nov 2014 22:25:30 +0000 Subject: [PATCH] Customizer: Don't override `Section.isContextuallyActive()` in `SidebarSection`. This fixes a bug where empty widget areas get deactivated in the Customizer. fixes #30378. see #30235. props westonruter. git-svn-id: https://develop.svn.wordpress.org/trunk@30552 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-widgets.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/wp-admin/js/customize-widgets.js b/src/wp-admin/js/customize-widgets.js index fb28d30d51..d649b6b021 100644 --- a/src/wp-admin/js/customize-widgets.js +++ b/src/wp-admin/js/customize-widgets.js @@ -1387,24 +1387,6 @@ registeredSidebar.set( 'is_rendered', active ); }); registeredSidebar.set( 'is_rendered', section.active() ); - }, - - /** - * Override Section.isContextuallyActive() to skip considering - * SidebarControl as opposed to a WidgetControl. - * - * @returns {boolean} - */ - isContextuallyActive: function () { - var section, activeCount; - section = this; - activeCount = 0; - _( section.controls() ).each( function ( control ) { - if ( control.active() && ! control.extended( api.Widgets.SidebarControl ) ) { - activeCount += 1; - } - }); - return ( activeCount !== 0 ); } });