3 * Customize API: WP_Customize_Themes_Section class
6 * @subpackage Customize
11 * Customize Themes Section class.
13 * A UI container for theme controls, which behaves like a backwards Panel.
17 * @see WP_Customize_Section
19 class WP_Customize_Themes_Section extends WP_Customize_Section {
22 * Customize section type.
28 public $type = 'themes';
31 * Render the themes section, which behaves like a panel.
36 protected function render() {
37 $classes = 'accordion-section control-section control-section-' . $this->type;
39 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
40 <h3 class="accordion-section-title">
42 if ( $this->manager->is_theme_active() ) {
43 echo '<span class="customize-action">' . __( 'Active theme' ) . '</span> ' . $this->title;
45 echo '<span class="customize-action">' . __( 'Previewing theme' ) . '</span> ' . $this->title;
49 <?php if ( count( $this->controls ) > 0 ) : ?>
50 <button type="button" class="button change-theme" tabindex="0"><?php _ex( 'Change', 'theme' ); ?></button>
53 <div class="customize-themes-panel control-panel-content themes-php">
54 <h3 class="accordion-section-title customize-section-title">
55 <span class="customize-action"><?php _e( 'Customizing' ); ?></span>
56 <?php _e( 'Themes' ); ?>
57 <span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>
59 <h3 class="accordion-section-title customize-section-title">
61 if ( $this->manager->is_theme_active() ) {
62 echo '<span class="customize-action">' . __( 'Active theme' ) . '</span> ' . $this->title;
64 echo '<span class="customize-action">' . __( 'Previewing theme' ) . '</span> ' . $this->title;
67 <button type="button" class="button customize-theme"><?php _e( 'Customize' ); ?></button>
70 <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
72 <div id="customize-container"></div>
73 <?php if ( count( $this->controls ) > 4 ) : ?>
74 <p><label for="themes-filter">
75 <span class="screen-reader-text"><?php _e( 'Search installed themes…' ); ?></span>
76 <input type="text" id="themes-filter" placeholder="<?php esc_attr_e( 'Search installed themes…' ); ?>" />
79 <div class="theme-browser rendered">
80 <ul class="themes accordion-section-content">