<?php
/**
 * Customizer Control functions.
 *
 * @package Matrimony
 */
class Matrimony_WP_Customize_Switch_Control extends WP_Customize_Control {
	public $type = 'switch';
	public function render_content() {
		?>
		<label>
			<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
			<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
			<div class="switch_options">
				<span class="switch_enable"><?php esc_html_e('Yes','matrimony'); ?></span>
				<span class="switch_disable"><?php esc_html_e('No','matrimony'); ?></span>  
				<input type="hidden" id="switch_yes_no" <?php $this->link(); ?> value="<?php echo esc_attr( $this->value() ); ?>" />
			</div>
		</label>
		<?php
	}
}
class Matrimony_Display_Gallery_Control extends WP_Customize_Control{
	public $type = 'gallery';
	 
	public function render_content() {
	?>
	<label>
		<span class="customize-control-title">
			<?php echo esc_html( $this->label ); ?>
		</span>

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

		<div class="gallery-screenshot clearfix">
    	<?php
        	{
        	$ids = explode( ',', $this->value() );
            	foreach ( $ids as $attachment_id ) {
                	$img = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
                	echo '<div class="screen-thumb"><img src="' . esc_url($img[0]) . '" /></div>';
            	}
        	}
    	?>
    	</div>
    	<input id="edit-gallery" class="button upload_gallery_button" type="button" value="<?php esc_attr_e('Add/Edit Gallery','matrimony') ?>" />
		<input id="clear-gallery" class="button upload_gallery_button" type="button" value="<?php esc_attr_e('Clear','matrimony') ?>" />
		<input type="hidden" class="gallery_values" <?php echo esc_attr($this->link()) ?> value="<?php echo esc_attr( $this->value() ); ?>">
	</label>
	<?php
	}
}


 


