<?php
if(!class_exists('Fox009_Vermilion_Customize_Control')
	&& class_exists('WP_Customize_Control')){

	class Fox009_Vermilion_Customize_Control extends WP_Customize_Control {
		
		public $heading = 'h3';
		public $parameters = array(); 
		
		public function __construct($manager, $id, $args = array()) {
			parent::__construct($manager, $id, $args);
		}

		protected function render_content() {
			$description_id   = '_customize-description-' . $this->id;
			switch($this->type) {
				case 'link':
					$link_href = $this->parameters['href'];
					$link_target = (!empty($this->parameters['href'])) ? $this->parameters['href'] : '_blank';
					$link_inner = $this->parameters['inner'];
					if(!empty($link_href)&&!empty($link_inner)){
						if(!empty($this->label)){
							echo '<' . esc_html($this->heading) . ' for="' . esc_attr($input_id) . 
								'" class="customize-control-' .	esc_html($this->heading) . '">';
							echo esc_html($this->label);
							echo '</' . esc_html($this->heading) . '>';
						}
						if(!empty($this->description)){
							echo '<p id="' . esc_attr($description_id) . 
								'" class="customize-control-description">';
							echo esc_html($this->description);
							echo '</p>';
						}
						echo '<a href="' . esc_url($link_href) . 
							'" class="customize-control-link" target="' .
							esc_attr($link_target) . '">';
						echo esc_html($link_inner);
						echo '</a>';
					}
					break;				
			}				
		}

	}
}
