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.

git-svn-id: https://develop.svn.wordpress.org/trunk@28861 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-06-26 20:16:21 +00:00
parent bc83ca24d4
commit 7edd9edde4
7 changed files with 379 additions and 20 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>