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
This commit is contained in:
Dominik Schilling (ocean90) 2014-11-24 22:25:30 +00:00
parent 09f6d69f5a
commit ea4528dc43

View File

@ -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 );
}
});