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:
parent
aace02c0c0
commit
d187a5eeba
|
@ -1387,24 +1387,6 @@
|
||||||
registeredSidebar.set( 'is_rendered', active );
|
registeredSidebar.set( 'is_rendered', active );
|
||||||
});
|
});
|
||||||
registeredSidebar.set( 'is_rendered', section.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
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue