<?php
add_action('init', 'confin_blog_kc_map', 99 );
function confin_blog_kc_map() {
  if (function_exists('kc_add_map')){
      kc_add_map(
        array(
        'blog_section' => array(
        'name' => esc_html__('Confin Blog', 'confin-core'),
        'description' => esc_html__( 'Blog content', 'confin-core' ),
        'category' => ConfinLibrary::confin_kc_cat_name(),
        'icon' => 'cpicon kc-icon-blog-posts',
        'title' => esc_html__('Blog Settings', 'confin-core'),
        'is_container' => true,
        'priority'  => 130,
        'params' => array(
          esc_html__( 'General', 'confin-core' )  => array(
            array(
              'name' => 'blog_colunm',
              'label' => esc_html__('Blog Column', 'confin-core'),
              'type' => 'select',
              'options' => array(
                  '' => esc_html__('Blog Column Style','confin-core'),
                  '50%' => esc_html__('Two Colunm','confin-core'),
                  '33.33%' => esc_html__('Three Colunm','confin-core'),
                  '25%' => esc_html__('Four Colunm','confin-core'),
                ),
              'admin_label' => true,
            ),
            array(
              "label"     =>esc_html__('Post Limit', 'confin-core'),
              "name"  => "blog_limit",
              'type' => 'number_slider',
                'options' => array(
                    'min' => 1,
                    'max' => 50,
                    'unit' => 'px',
                    'show_input' => true
                ),
              "description" => esc_html__( "Enter the number of items to show.", 'confin-core'),
            ),
            array(
              'type' => 'select',
              'label' => esc_html__( 'Order', 'confin-core' ),
              'options' => array(
                '' => esc_html__( 'Select Order', 'confin-core' ),
                'ASC' => esc_html__( 'Asending', 'confin-core' ),
                'DESC' => esc_html__( 'Desending', 'confin-core' ),
              ),
              'name' => 'blog_order',
            ),
            array(
              'name' => 'blog_orderby',
              'type' => 'select',
              'label' => esc_html__( 'Order By', 'confin-core' ),
              'options' => array(
                '' => esc_html__( 'Select Order', 'confin-core' ),
                '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' ),
              ),
            ),
            array(
              'name' => 'particular_item',
              'type' => 'post_taxonomy',
              'label' => esc_html__( 'Set particular category for display post from these category.', 'confin-core' ),
            ),
            array(
              'name' => 'pagination',
              'type' => 'toggle',
              'label' => esc_html__( 'Pagination', 'confin-core' ),
              'description' => esc_html__('Turn On if you want to Show Blog Date.', 'confin-core'),
            ),
           array(
              'name' => 'blog_date',
              'label' => esc_html__('Blog Date','confin-core'),
              'type' => 'toggle',
              'value'     => 'yes',
              'admin_label' => true,
              'description' => esc_html__('Turn On if you want to Hide Blog Date.', 'confin-core')
            ),
           array(
              'name' => 'blog_author',
              'label' => esc_html__('Blog Author','confin-core'),
              'type' => 'toggle',
              'value'     => 'yes',
              'admin_label' => true,
              'description' => esc_html__('Turn On if you want to Hide Blog Author.', 'confin-core')
            ),
           array(
              'name' => 'blog_tags',
              'label' => esc_html__('Blog Tags','confin-core'),
              'type' => 'toggle',
              'value'     => 'yes',
              'admin_label' => true,
              'description' => esc_html__('Turn On if you want to Hide Blog Tags.', 'confin-core')
            ),
            array(
              'name' => 'class',
              'type' => 'text',
              'label' => esc_html__( 'Custom Class', 'confin-core' ),
            ),
          ),
          esc_html__( 'Style', 'confin-core' ) => array(
            array(
              "name"  => "title_color",
              "type"        =>'color_picker',
              "label"     =>esc_html__('Title Color', 'confin-core'),
            ),
            array(
              "name"  => "title_size",
              "type"        =>'number_slider',
              "label"     =>esc_html__('Title Size', 'confin-core'),
              'options' => array(
                'min' => 10,
                'max' => 40,
                'unit' => 'px',
                'show_input' => true
              )
            ),
            array(
              'name' => 'date_color',
              'label' => esc_html__('Date Color', 'confin-core'),
              'type' => 'color_picker',
            ),
            array(
              'name' => 'date_bg',
              'label' => esc_html__('Date Background Color', 'confin-core'),
              'type' => 'color_picker',
            ),
            array(
              'name' => 'meta_color',
              'label' => esc_html__('Post Meta Color', 'confin-core'),
              'type' => 'color_picker',
            ),

          ),
        ),
      ),
      )
    ); // End add map
    }
} // End if