<?php

/**
 * Custom Toggle Switch Control
 */

if (class_exists('WP_Customize_Control') && ! class_exists('CleanLogic_Toggle_Control')) {
	class CleanLogic_Toggle_Control extends WP_Customize_Control
	{
		public $type = 'toggle';

		public function render_content()
		{
?>

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

			<label class="switch">
				<input type="checkbox" value="1" <?php $this->link(); ?> <?php checked($this->value(), 1); ?> />
				<span class="slider"></span>
			</label>

<?php
		}
	}
}
