<?php
/**
 * Custom control class to display custom 'label' and 'desctiption' on any Customizer settings section.
 */

if ( ! class_exists( 'Basho_Section_Intro_Control' ) ) {
    /*
     * Render just 'label' and 'desctiption' from the control settings.
     */
    class Basho_Section_Intro_Control extends WP_Customize_Control {

        protected function render_content() {

            if ( ! empty( $this->label ) ) {
                ?>
                <span class="customize-control-title">
                    <?php echo esc_html( $this->label ); ?>
                </span>
                <?php
            }

            if ( ! empty( $this->description ) ) {
                ?>
               <span class="description customize-control-description">
                   <?php echo esc_html( $this->description ); ?>
               </span>
               <?php
           }

        }

    }
}
