<?php
add_action('init', 'confin_project_filter_kc_map', 99 );
function confin_project_filter_kc_map() {

	if (function_exists('kc_add_map')){
	    kc_add_map(
	        array(
	            'tpl_project_filter' => array(
	                'name' => esc_html__('Project Filter','confin-core'),
	                'description' => esc_html__('Display Project', 'confin-core'),
	                'icon' => 'cpicon kc-icon-image-hover',
	                'category' => ConfinLibrary::confin_kc_cat_name(),
	                'params' => array(
                  'Content' => array(
                  array(
                      'name' => 'all_project',
                      'label' => esc_html__( 'Write All Project Title','confin-core'),
                      'type' => 'text',
                      'description' => esc_html__('Write All Project Title ', 'confin-core'),
                    ),
                    array(
                        'name' => 'project_limit',
                        'label' => esc_html__( 'Project Limit','confin-core'),
                        'type' => 'text',
                        'description' => esc_html__('Write Project Limit ', 'confin-core'),
                      ),
                    array(
                        'name' => 'particular_item',
                        'type' => 'autocomplete',
                        'label' => esc_html__( 'Particular Project', 'confin-core' ),
                        'options'       => array(
                          'multiple'      => true,
                          'post_type'     => 'project_filter',
                        ),
                        'description' => esc_html__('Type Project Name, and select after auto detect', 'confin-core'),
                      ),
                    array(
                        'name' => 'project_show_category',
                        'label' => esc_html__( 'Show Certain Categories','confin-core'),
                        'type' => 'text',
                        'description' => esc_html__('Show only certain categories ', 'confin-core'),
                      ),
                    array(
                        'name' => 'project_hide_post',
                        'label' => esc_html__( 'Hide Certain Project','confin-core'),
                        'type' => 'text',
                        'description' => esc_html__('Hide only certain Project ', 'confin-core'),
                      ),
                    array(
                        'name' => 'project_filter',
                        'label' => esc_html__( 'Project Filter','confin-core'),
                        'type' => 'toggle',
                        'admin_label' => true,
                        'description' => esc_html__('Turn Off if you want to Hide Project Filter', 'confin-core'),
                      ),
                    array(
                        'name' => 'project_order',
                        'label' => esc_html__( 'Orderby','confin-core'),
                        'type' => 'select',
                          'options' => array(
                            '' => esc_html__('Order','confin-core'),
                            'ASC' => esc_html__('Asending','confin-core'),
                            'DESC' => esc_html__('Desending','confin-core'),
                          ),
                        'admin_label' => true,
                        'description' => esc_html__('Select Project Orderby ', 'confin-core'),
                      ),
                    array(
                        'name' => 'project_orderby',
                        'label' => esc_html__( 'Order By','confin-core'),
                        'type' => 'select',
                          'options' => array(
                            'none' => esc_html__('None','confin-core'),
                            'ID' => esc_html__('ID','confin-core'),
                            'author' => esc_html__('Author','confin-core'),
                            'title' => esc_html__('Title','confin-core'),
                            'date' => esc_html__('Date','confin-core'),
                            'menu_order' => esc_html__('Menu order','confin-core'),
                          ),
                        'admin_label' => true,
                      ),
                    ),
                    'Style' => array(
	                    array(
                        'name' => 'class',
                        'label' => esc_html__('Extra Class','confin-core'),
                        'type' => 'text',
                        'admin_label' => true,
                        'description' => esc_html__('Enter Extra Class for Titlte ..', 'confin-core')
                      ),
                      array(
                        'name' => 'title_color',
                        'label' => esc_html__('Title Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for title', 'confin-core')
                      ),
                      array(
                        'name' => 'title_size',
                        'label' => esc_html__('Title Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for title such as: 15px, 1em ..etc..', 'confin-core')
	                    ),
	                    array(
                        'name' => 'subtitle_color',
                        'label' => esc_html__('Sub Title Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Sub title', 'confin-core')
	                    ),
                      array(
                        'name' => 'subtitle_size',
                        'label' => esc_html__('Sub Title Size','confin-core'),
                        'type' => 'number_slider',
                        'options' => array(
                          'min' => 15,
                          'max' => 60,
                          'unit' => 'px',
                          'show_input' => true
                        ),
                        'description' => esc_html__('Enter font-size for Sub title such as: 15px, 1em ..etc..', 'confin-core')
                      ),
                      array(
                        'name' => 'bg_color',
                        'label' => esc_html__('Project Background Hover Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set color for Hover Background', 'confin-core')
                      ),
                      array(
                        'name' => 'btn_bgcolor',
                        'label' => esc_html__('Project Slider Button Background Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set button Background color for Project Slider', 'confin-core')
                      ),
                      array(
                        'name' => 'btn_color',
                        'label' => esc_html__('Project Slider Button Color','confin-core'),
                        'type' => 'color_picker',
                        'admin_label' => true,
                        'description' => esc_html__('Set button color for Project Slider', 'confin-core')
                      ),
		                )
	                )
	            ),  // End of elemnt kc_icon

	        )
	    ); // End add map

	} // End if

}
