Customizer: Introduce a "panel" API to organize multiple sections into a one section.

Create a panel via `$GLOBALS['wp_customize']->add_panel( $panel_id, $args )` and use `$panel_id` for the `panel` argument in `$GLOBALS['wp_customize']->add_section( $section_id, $args )`. That's it.
As an example all widget area sections are now summarized into one panel. Feedback appreciated.

props celloexpressions.
see #27406.
Built from https://develop.svn.wordpress.org/trunk@28861


git-svn-id: http://core.svn.wordpress.org/trunk@28662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2014-06-26 20:17:15 +00:00
parent a21d9cdacf
commit b7c93eb3d0
39 changed files with 591 additions and 44 deletions

View File

@@ -142,8 +142,12 @@ do_action( 'customize_controls_print_scripts' );
<div id="customize-theme-controls"><ul>
<?php
foreach ( $wp_customize->sections() as $section )
foreach ( $wp_customize->panels() as $panel ) {
$panel->maybe_render();
}
foreach ( $wp_customize->sections() as $section ) {
$section->maybe_render();
}
?>
</ul></div>
</div>