Make WordPress Core


Ignore:
Timestamp:
12/02/2014 10:15:33 PM (10 years ago)
Author:
ocean90
Message:

Customizer: Add panel/section type as CSS class to the HTML container.

see #28709.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r30656 r30714  
    104104
    105105    /**
    106      * @since 4.1.0
    107      * @access public
    108      * @var string
    109      */
    110     public $type;
     106     * Type of this panel.
     107     *
     108     * @since 4.1.0
     109     * @access public
     110     * @var string
     111     */
     112    public $type = 'default';
    111113
    112114    /**
     
    286288     */
    287289    protected function render() {
     290        $classes = 'accordion-section control-section control-panel control-panel-' . $this->type;
    288291        ?>
    289         <li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section">
     292        <li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
    290293            <h3 class="accordion-section-title" tabindex="0">
    291294                <?php echo esc_html( $this->title ); ?>
Note: See TracChangeset for help on using the changeset viewer.