WordPress.org

Make WordPress Core

Changeset 30714


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

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

see #28709.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-widgets.css

    r28148 r30714  
    88 */
    99
    10 .control-section[id^="accordion-section-sidebar-widgets-"],
     10.control-section.control-section-sidebar,
    1111.customize-control-sidebar_widgets label,
    1212.customize-control-sidebar_widgets .hide-if-js {
    1313    /* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
    14     display:none;
     14    display: none;
    1515}
    1616
  • 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 ); ?>
  • trunk/src/wp-includes/class-wp-customize-section.php

    r30656 r30714  
    113113
    114114    /**
    115      * @since 4.1.0
    116      * @access public
    117      * @var string
    118      */
    119     public $type;
     115     * Type of this section.
     116     *
     117     * @since 4.1.0
     118     * @access public
     119     * @var string
     120     */
     121    public $type = 'default';
    120122
    121123    /**
     
    293295     */
    294296    protected function render() {
    295         $classes = 'control-section accordion-section';
     297        $classes = 'accordion-section control-section control-section-' . $this->type;
    296298        ?>
    297299        <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
     
    325327
    326328    /**
     329     * Type of this section.
     330     *
    327331     * @since 4.1.0
    328332     * @access public
Note: See TracChangeset for help on using the changeset viewer.