Customizer: Improve ability to filter active state for widget area Customizer sections.

* Mark panels, sections, controls as active if preview explicitly indicates.
* Introduce `WP_Customize_Sidebar_Section` PHP class, and `SidebarSection` JS class.
* Move logic for determining whether a sidebar section is active from the `SidebarControl` to `SidebarSection`.

props westonruter.
fixes #30235.

git-svn-id: https://develop.svn.wordpress.org/trunk@30329 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-11-13 12:18:01 +00:00
parent 2a941720be
commit 8d476eee4f
6 changed files with 115 additions and 36 deletions

View File

@@ -515,6 +515,9 @@ final class WP_Customize_Manager {
}
foreach ( $this->panels as $id => $panel ) {
$settings['activePanels'][ $id ] = $panel->active();
foreach ( $panel->sections as $id => $section ) {
$settings['activeSections'][ $id ] = $section->active();
}
}
foreach ( $this->sections as $id => $section ) {
$settings['activeSections'][ $id ] = $section->active();