<?php add_action( 'vc_before_init', 'dt_sc_recent_post_vc_map' );
function dt_sc_recent_post_vc_map() {

	$arr = array( esc_html__('Yes','dental-core') => 'yes', esc_html__('No','dental-core') => 'no' );

	vc_map( array(
		"name" => esc_html__( "Recent Posts", 'dental-core' ),
		"base" => "dt_sc_recent_post",
		"icon" => "dt_sc_recent_post",
		"category" => DT_VC_CATEGORY,
		"description" => esc_html__("Show recent posts",'dental-core'),
		"params" => array(

			// Post Count
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Post Counts', 'dental-core' ),
				'param_name' => 'count',
				'description' => esc_html__( 'Enter post count', 'dental-core' ),
				'admin_label' => true
			),

			// Post column
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Columns','dental-core'),
				'param_name' => 'column',
				'value' => array(
					esc_html__('I Column','dental-core') => 1,
					esc_html__('II Columns','dental-core') => 2 ,
					esc_html__('III Columns','dental-core') => 3
				),
				'std' => 2
			),

			// Post style
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Style','dental-core'),
				'param_name' => 'style',
				'value' => array(
					esc_html__('Default','dental-core') => 'entry-default',
					esc_html__('Date Left','dental-core') => 'entry-date-left',
					esc_html__('Date and Author Left','dental-core') => 'entry-date-author-left',
					esc_html__('Medium','dental-core') => 'blog-medium-style',
					esc_html__('Medium Highlight','dental-core') => 'blog-medium-style dt-blog-medium-highlight',
					esc_html__('Medium Skin Highlight','dental-core') => 'blog-medium-style dt-blog-medium-highlight dt-sc-skin-highlight'	
				),
				'std' => 'entry-default'
			),

			// Allow excerpt
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Allow Excerpt','dental-core'),
				'param_name' => 'allow_excerpt',
				'value' => $arr
			),

			// Excerpt Length
			array(
				'type' => 'textfield',
				'heading' => esc_html__( 'Excerpt Length', 'dental-core' ),
				'param_name' => 'excerpt_length',
				'value' => 40
			),

			// Show Post Format?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Post Format?','dental-core'),
				'param_name' => 'show_post_format',
				'value' => $arr
			),

			// Show Author ?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Author ?','dental-core'),
				'param_name' => 'show_author',
				'value' => $arr
			),

			// Show Date ?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Date ?','dental-core'),
				'param_name' => 'show_date',
				'value' => $arr
			),

			// Show Comment ?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Comment ?','dental-core'),
				'param_name' => 'show_comment',
				'value' => $arr
			),

			// Show Category?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Category?','dental-core'),
				'param_name' => 'show_category',
				'value' => $arr
			),

			// Show Tag?
			array(
				'type' => 'dropdown',
				'heading' => esc_html__('Show Tag?','dental-core'),
				'param_name' => 'show_tag',
				'value' => $arr
			),

			// Button Style
			array(
				'type' => 'textarea_html',
				'heading' => esc_html__('Read more Button','dental-core'),
				'param_name' => 'content',
				'value' => '[dt_sc_button title="Read More" style="bordered" icon_type="fontawesome" iconalign="icon-right with-icon" iconclass="fa fa-long-arrow-right" class="type2" target="_blank" /]'
			)
		)
	) );	
}?>