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:
parent
09f6d69f5a
commit
ea4528dc43
@ -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 );
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user