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.
Built from https://develop.svn.wordpress.org/trunk@30552


git-svn-id: http://core.svn.wordpress.org/trunk@30541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-11-24 22:26:23 +00:00
parent aace02c0c0
commit d187a5eeba
3 changed files with 2 additions and 20 deletions

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

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30551';
$wp_version = '4.1-beta2-30552';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.