Make WordPress Core


Ignore:
Timestamp:
06/26/2014 08:16:21 PM (11 years ago)
Author:
ocean90
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src

    • Property svn:ignore
      •  

        old new  
        11.wp-tests-version
        22.htaccess
         3web-store-experiences
  • trunk/src/wp-admin/customize.php

    r28482 r28861  
    143143            <div id="customize-theme-controls"><ul>
    144144                <?php
    145                 foreach ( $wp_customize->sections() as $section )
     145                foreach ( $wp_customize->panels() as $panel ) {
     146                    $panel->maybe_render();
     147                }
     148                foreach ( $wp_customize->sections() as $section ) {
    146149                    $section->maybe_render();
     150                }
    147151                ?>
    148152            </ul></div>
Note: See TracChangeset for help on using the changeset viewer.