<?php

/**
 * Goblog Free Add Class Toggle Switch Customize.
 *
 * @package Goblog Free
 * @subpackage Goblog Free
 * @since 1.0
 */

if (class_exists('WP_Customize_Control')) {
    class Goblog_Free_Customize_Toggle_Switch extends WP_Customize_Control
    {

        public $type = 'toggle_switch';

        public function render_content()
        {
?>
            <div class="container-toggle-switch">
                <input type="checkbox" id="<?php echo esc_attr($this->id); ?>" name="<?php echo esc_attr($this->id); ?>" class="toggle-switch-checkbox" value="<?php echo esc_attr($this->value()); ?>" <?php $this->link();
                                                                                                                                                                                                            checked($this->value()); ?>>
                <label class="toggle-switch-label" for="<?php echo esc_attr($this->id); ?>">
                    <span class="toggle-switch-inner"></span>
                    <span class="toggle-switch-switch"></span>
                </label>
            </div>
            <span class="title-customize"><?php echo esc_html($this->label); ?></span>
<?php
        } // End Function render_content()
    } // End Class Goblog_Free_Customize_Toggle_Switch
} // End Check class_exists