<?php
/*
 * All Theme Options for Confin theme.
 * Author & Copyright:themexshaper
 * URL: http://themeforest.net/user/themexshaper
 */

function confin_settings( $settings ) {

  $settings           = array(
    'menu_title'      => CONFIN_NAME . esc_html__(' Options', 'confin'),
    'menu_slug'       => sanitize_title(CONFIN_NAME) . '_options',
    'menu_type'       => 'theme',
    'menu_icon'       => 'dashicons-awards',
    'menu_position'   => '4',
    'ajax_save'       => false,
    'show_reset_all'  => true,
    'framework_title' => CONFIN_NAME .' <small>V-'. CONFIN_VERSION .' by <a href="'. CONFIN_BRAND_URL .'" target="_blank">'. CONFIN_BRAND_NAME .'</a></small>',
  );

  return $settings;

}
add_filter( 'cs_framework_settings', 'confin_settings' );

// Theme Framework Options
function confin_options( $options ) {

  $options      = array(); // remove old options

  // ------------------------------
  // Branding
  // ------------------------------
  $options[]   = array(
    'name'     => 'confin_theme_branding',
    'title'    => esc_html__('Brand', 'confin'),
    'icon'     => 'fa fa-trophy',
    'sections' => array(

      // brand logo tab
      array(
        'name'     => 'brand_logo',
        'title'    => esc_html__('Logo', 'confin'),
        'icon'     => 'fa fa-star',
        'fields'   => array(

          // Site Logo
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Site Logo', 'confin')
          ),
          array(
            'id'    => 'confin_logo',
            'type'  => 'image',
            'title' => esc_html__('Default Logo', 'confin'),
            'info'  => esc_html__('Upload your default logo here. If you not upload, then site title will load in this logo location.', 'confin'),
            'add_title' => esc_html__('Add Logo', 'confin'),
          ),
          array(
            'id'    => 'confin_trlogo',
            'type'  => 'image',
            'title' => esc_html__('Transparent Logo', 'confin'),
            'info'  => esc_html__('Upload your Transparent logo here. If you not upload, then site title will load in this logo location.', 'confin'),
            'add_title' => esc_html__('Add Logo', 'confin'),
          ),
          array(
            'id'          => 'confin_logo_top',
            'type'        => 'number',
            'title'       => esc_html__('Logo Top Space', 'confin'),
            'attributes'  => array( 'placeholder' => 5 ),
            'unit'        => 'px',
          ),
          array(
            'id'          => 'confin_logo_bottom',
            'type'        => 'number',
            'title'       => esc_html__('Logo Bottom Space', 'confin'),
            'attributes'  => array( 'placeholder' => 5 ),
            'unit'        => 'px',
          ),
          // WordPress Admin Logo
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('WordPress Admin Logo', 'confin')
          ),
          array(
            'id'    => 'brand_logo_wp',
            'type'  => 'image',
            'title' => esc_html__('Login logo', 'confin'),
            'info'  => esc_html__('Upload your WordPress login page logo here.', 'confin'),
            'add_title' => esc_html__('Add Login Logo', 'confin'),
          ),
        ) // end: fields
      ), // end: section
    ),
  );

  // ------------------------------
  // Layout
  // ------------------------------
  $options[] = array(
    'name'   => 'theme_layout',
    'title'  => esc_html__('Layout', 'confin'),
    'icon'   => 'fa fa-file-text'
  );

  $options[]      = array(
    'name'        => 'theme_general',
    'title'       => esc_html__('General', 'confin'),
    'icon'        => 'fa fa-wrench',

    // begin: fields
    'fields'      => array(

      // -----------------------------
      // Begin: Responsive
      // -----------------------------
       array(
        'id'    => 'theme_responsive',
        'off_text'  => 'No',
        'on_text'  => 'Yes',
        'type'  => 'switcher',
        'title' => esc_html__('Responsive', 'confin'),
        'info' => esc_html__('Turn on if you don\'t want your site to be responsive.', 'confin'),
        'default' => false,
      ),
      array(
        'id'    => 'theme_preloder',
        'off_text'  => 'No',
        'on_text'  => 'Yes',
        'type'  => 'switcher',
        'title' => esc_html__('Preloder', 'confin'),
        'info' => esc_html__('Turn off if you don\'t want your site to be Preloder.', 'confin'),
        'default' => true,
      ),
      array(
        'id'    => 'theme_layout_width',
        'type'  => 'image_select',
        'title' => esc_html__('Full Width & Extra Width', 'confin'),
        'info' => esc_html__('Boxed or Fullwidth? Choose your site layout width. Default : Full Width', 'confin'),
        'options'      => array(
          'container'    => CONFIN_CS_IMAGES .'/boxed-width.jpg',
          'container-fluid'    => CONFIN_CS_IMAGES .'/full-width.jpg',
        ),
        'default'      => 'container-fluid',
        'radio'      => true,
      ),
       array(
        'id'    => 'theme_page_comments',
        'type'  => 'switcher',
        'title' => esc_html__('Hide Page Comments?', 'confin'),
        'label' => esc_html__('Yes! Hide Page Comments.', 'confin'),
        'on_text' => esc_html__('Yes', 'confin'),
        'off_text' => esc_html__('No', 'confin'),
        'default' => false,
      ),
      array(
        'type'    => 'notice',
        'class'   => 'info cs-confin-heading',
        'content' => esc_html__('Background Options', 'confin'),
        'dependency' => array( 'theme_layout_width_container', '==', 'true' ),
      ),
      array(
        'id'             => 'theme_layout_bg_type',
        'type'           => 'select',
        'title'          => esc_html__('Background Type', 'confin'),
        'options'        => array(
          'bg-image' => esc_html__('Image', 'confin'),
          'bg-pattern' => esc_html__('Pattern', 'confin'),
        ),
        'dependency' => array( 'theme_layout_width_container', '==', 'true' ),
      ),
      array(
        'id'    => 'theme_layout_bg_pattern',
        'type'  => 'image_select',
        'title' => esc_html__('Background Pattern', 'confin'),
        'info' => esc_html__('Select background pattern', 'confin'),
        'options'      => array(
          'pattern-1'    => CONFIN_CS_IMAGES . '/pattern-1.png',
          'pattern-2'    => CONFIN_CS_IMAGES . '/pattern-2.png',
          'pattern-3'    => CONFIN_CS_IMAGES . '/pattern-3.png',
          'pattern-4'    => CONFIN_CS_IMAGES . '/pattern-4.png',
          'custom-pattern'  => CONFIN_CS_IMAGES . '/pattern-5.png',
        ),
        'default'      => 'pattern-1',
        'radio'      => true,
        'dependency' => array( 'theme_layout_width_container|theme_layout_bg_type', '==|==', 'true|bg-pattern' ),
      ),
      array(
        'id'      => 'custom_bg_pattern',
        'type'    => 'upload',
        'title'   => esc_html__('Custom Pattern', 'confin'),
        'dependency' => array( 'theme_layout_width_container|theme_layout_bg_type|theme_layout_bg_pattern_custom-pattern', '==|==|==', 'true|bg-pattern|true' ),
        'info' => __('Select your custom background pattern. <br />Note, background pattern image will be repeat in all x and y axis. So, please consider all repeatable area will perfectly fit your custom patterns.', 'confin'),
      ),
      array(
        'id'      => 'theme_layout_bg',
        'type'    => 'background',
        'title'   => esc_html__('Background', 'confin'),
        'dependency' => array( 'theme_layout_width_container|theme_layout_bg_type', '==|==', 'true|bg-image' ),
      ),

    ), // end: fields

  );

  // ------------------------------
  // Header Sections
  // ------------------------------
  $options[]   = array(
    'name'     => 'theme_header_tab',
    'title'    => esc_html__('Header', 'confin'),
    'icon'     => 'fa fa-bars',
    'sections' => array(

      // header design tab
      array(
        'name'     => 'header_design_tab',
        'title'    => esc_html__('Design', 'confin'),
        'icon'     => 'fa fa-magic',
        'fields'   => array(

          // Header Select
          array(
            'id'           => 'select_header_design',
            'type'         => 'image_select',
            'title'        => esc_html__('Select Header Design', 'confin'),
            'options'      => array(
              'style_one'    => CONFIN_CS_IMAGES .'/hs-1.png',
              'style_two'    => CONFIN_CS_IMAGES .'/hs-2.png',
            ),
            'attributes' => array(
              'data-depend-id' => 'header_design',
            ),
            'radio'        => true,
            'default'   => 'style_one',
            'info' => esc_html__('Select your header design, following options will may differ based on your selection of header design.', 'confin'),
          ),
          // Header Select

          array(
            'id'    => 'contact_title',
            'type'  => 'text',
            'title' => esc_html__('Contact Title', 'confin'),
            'info' => esc_html__('Header Contact', 'confin'),
            'dependency'  => array('header_design', '==', 'style_two'),
          ),
          array(
            'id'    => 'contact_number',
            'type'  => 'text',
            'title' => esc_html__('Contact Number', 'confin'),
            'info' => esc_html__('Header Contact', 'confin'),
            'dependency'  => array('header_design', '==', 'style_two'),
          ),
          // Extra's
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Extra\'s', 'confin'),
          ),
          array(
            'id'    => 'sticky_header',
            'type'  => 'switcher',
            'title' => esc_html__('Sticky Header', 'confin'),
            'info' => esc_html__('Turn On if you want your naviagtion bar on sticky.', 'confin'),
            'default' => true,
          ),
           array(
            'id'    => 'header_search',
            'type'  => 'switcher',
            'title' => esc_html__('Header Search', 'confin'),
            'info' => esc_html__('Turn On if you want to hide Header Search .', 'confin'),
            'default' => false,
          ),
        )
      ),

      // header top bar
      array(
        'name'     => 'header_top_bar_tab',
        'title'    => esc_html__('Top Bar', 'confin'),
        'icon'     => 'fa fa-minus',
        'fields'   => array(

          array(
            'id'          => 'top_bar',
            'type'        => 'switcher',
            'title'       => esc_html__('Topbar', 'confin'),
            'default'     => false,
          ),
          array(
            'id'          => 'top_left',
            'title'       => esc_html__('Top left Block', 'confin'),
            'desc'        => esc_html__('Top bar left block.', 'confin'),
            'type'        => 'textarea',
            'shortcode'   => true,
            'dependency'  => array('top_bar', '==', true),
          ),
          array(
            'id'          => 'top_right',
            'title'       => esc_html__('Top Right Block', 'confin'),
            'desc'        => esc_html__('Top bar right block.', 'confin'),
            'type'        => 'textarea',
            'shortcode'   => true,
            'dependency'  => array('top_bar', '==', true),
          ),
        )
      ),

      // header banner
      array(
        'name'     => 'header_banner_tab',
        'title'    => esc_html__('Title Bar (or) Banner', 'confin'),
        'icon'     => 'fa fa-bullhorn',
        'fields'   => array(

          // Title Area
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Title Area', 'confin')
          ),
          array(
            'id'      => 'need_title_bar',
            'type'    => 'switcher',
            'title'   => esc_html__('Title Bar ?', 'confin'),
            'label'   => esc_html__('If you want to Hide title bar in your sub-pages, please turn this ON.', 'confin'),
            'default'    => false,
          ),
          array(
            'id'             => 'title_bar_padding',
            'type'           => 'select',
            'title'          => esc_html__('Padding Spaces Top & Bottom', 'confin'),
            'options'        => array(
              'padding-default' => esc_html__('Default Spacing', 'confin'),
              'padding-custom' => esc_html__('Custom Padding', 'confin'),
            ),
            'dependency'   => array( 'need_title_bar', '==', 'false' ),
          ),
          array(
            'id'             => 'titlebar_top_padding',
            'type'           => 'text',
            'title'          => esc_html__('Padding Top', 'confin'),
            'attributes' => array(
              'placeholder'     => '100px',
            ),
            'dependency'   => array( 'title_bar_padding', '==', 'padding-custom' ),
          ),
          array(
            'id'             => 'titlebar_bottom_padding',
            'type'           => 'text',
            'title'          => esc_html__('Padding Bottom', 'confin'),
            'attributes' => array(
              'placeholder'     => '100px',
            ),
            'dependency'   => array( 'title_bar_padding', '==', 'padding-custom' ),
          ),

          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Background Options', 'confin'),
            'dependency' => array( 'need_title_bar', '==', 'false' ),
          ),
          array(
            'id'      => 'titlebar_bg_overlay_color',
            'type'    => 'color_picker',
            'title'   => esc_html__('Overlay Color', 'confin'),
            'dependency' => array( 'need_title_bar', '==', 'false' ),
          ),
          array(
            'id'      => 'title_bar_bg',
            'type'    => 'background',
            'title'   => esc_html__('Title Bar Background', 'confin'),
            'dependency' => array( 'need_title_bar', '==', 'false' ),
          ),
          array(
            'id'    => 'title_color',
            'type'  => 'color_picker',
            'title' => esc_html__('Title Color', 'confin'),
            'dependency'   => array('banner_type', '==', 'default-title'),
          ),

          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Breadcrumbs', 'confin'),
          ),
         array(
            'id'      => 'need_breadcrumbs',
            'type'    => 'switcher',
            'title'   => esc_html__('Hide Breadcrumbs', 'confin'),
            'label'   => esc_html__('If you want to hide breadcrumbs in your banner, please turn this ON.', 'confin'),
            'default'    => false,
          ),
        )
      ),

    ),
  );

  // ------------------------------
  // Footer Section
  // ------------------------------
  $options[]   = array(
    'name'     => 'footer_section',
    'title'    => esc_html__('Footer', 'confin'),
    'icon'     => 'fa fa-ellipsis-h',
    'sections' => array(

      // footer widgets
      array(
        'name'     => 'footer_widgets_tab',
        'title'    => esc_html__('Widget Area', 'confin'),
        'icon'     => 'fa fa-th',
        'fields'   => array(

          // Footer Widget Block
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Footer Widget Block', 'confin')
          ),
          array(
            'id'    => 'footer_widget_block',
            'type'  => 'switcher',
            'title' => esc_html__('Enable Widget Block', 'confin'),
            'info' => __('If you turn this ON, then Goto : Appearance > Widgets. There you can see <strong>Footer Widget 1,2,3 or 4</strong> Widget Area, add your widgets there.', 'confin'),
            'default' => true,
          ),
          array(
            'id'    => 'footer_widget_layout',
            'type'  => 'image_select',
            'title' => esc_html__('Widget Layouts', 'confin'),
            'info' => esc_html__('Choose your footer widget theme-layouts.', 'confin'),
            'default' => 4,
            'options' => array(
              1   => CONFIN_CS_IMAGES . '/footer/footer-1.png',
              2   => CONFIN_CS_IMAGES . '/footer/footer-2.png',
              3   => CONFIN_CS_IMAGES . '/footer/footer-3.png',
              4   => CONFIN_CS_IMAGES . '/footer/footer-4.png',
              5   => CONFIN_CS_IMAGES . '/footer/footer-5.png',
              6   => CONFIN_CS_IMAGES . '/footer/footer-6.png',
              7   => CONFIN_CS_IMAGES . '/footer/footer-7.png',
              8   => CONFIN_CS_IMAGES . '/footer/footer-8.png',
              9   => CONFIN_CS_IMAGES . '/footer/footer-9.png',
              10   => CONFIN_CS_IMAGES . '/footer/footer-10.png',
            ),
            'radio'       => true,
            'dependency'  => array('footer_widget_block', '==', true),
          ),
           array(
            'id'    => 'confin_ft_bg',
            'type'  => 'image',
            'title' => esc_html__('Footer Background', 'confin'),
            'info'  => esc_html__('Upload your footer background.', 'confin'),
            'add_title' => esc_html__('footer background', 'confin'),
            'dependency'  => array('footer_widget_block', '==', true),
          ),

        )
      ),

      // footer copyright
      array(
        'name'     => 'footer_copyright_tab',
        'title'    => esc_html__('Copyright Bar', 'confin'),
        'icon'     => 'fa fa-copyright',
        'fields'   => array(

          // Copyright
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Copyright Layout', 'confin'),
          ),
         array(
            'id'    => 'hide_copyright',
            'type'  => 'switcher',
            'title' => esc_html__('Hide Copyright?', 'confin'),
            'default' => false,
            'on_text' => esc_html__('Yes', 'confin'),
            'off_text' => esc_html__('No', 'confin'),
            'label' => esc_html__('Yes, do it!', 'confin'),
          ),
          array(
            'id'    => 'footer_copyright_layout',
            'type'  => 'image_select',
            'title' => esc_html__('Select Copyright Layout', 'confin'),
            'info' => esc_html__('In above image, blue box is copyright text and yellow box is secondary text.', 'confin'),
            'default'      => 'copyright-3',
            'options'      => array(
              'copyright-1'    => CONFIN_CS_IMAGES .'/footer/copyright-1.png',
              ),
            'radio'        => true,
            'dependency'     => array('hide_copyright', '!=', true),
          ),
          array(
            'id'    => 'copyright_text',
            'type'  => 'textarea',
            'title' => esc_html__('Copyright Text', 'confin'),
            'shortcode' => true,
            'dependency' => array('hide_copyright', '!=', true),
            'after'       => 'Helpful shortcodes: [current_year] [home_url] or any shortcode.',
          ),

          // Copyright Another Text
          array(
            'type'    => 'notice',
            'class'   => 'warning cs-confin-heading',
            'content' => esc_html__('Copyright Secondary Text', 'confin'),
             'dependency'     => array('hide_copyright', '!=', true),
          ),
          array(
            'id'    => 'secondary_text',
            'type'  => 'textarea',
            'title' => esc_html__('Secondary Text', 'confin'),
            'shortcode' => true,
            'dependency'     => array('hide_copyright', '!=', true),
          ),

        )
      ),

    ),
  );

  // ------------------------------
  // Design
  // ------------------------------
  $options[] = array(
    'name'   => 'theme_design',
    'title'  => esc_html__('Design', 'confin'),
    'icon'   => 'fa fa-magic'
  );

  // ------------------------------
  // color section
  // ------------------------------
  $options[]   = array(
    'name'     => 'theme_color_section',
    'title'    => esc_html__('Colors', 'confin'),
    'icon'     => 'fa fa-eyedropper',
    'fields' => array(

      array(
        'type'    => 'heading',
        'content' => esc_html__('Color Options', 'confin'),
      ),
      array(
        'type'    => 'subheading',
        'wrap_class' => 'color-tab-content',
        'content' => esc_html__('All color options are available in our theme customizer. The reason of we used customizer options for color section is because, you can choose each part of color from there and see the changes instantly using customizer. Highly customizable colors are in Appearance > Customize', 'confin'),
      ),

    ),
  );

  // ------------------------------
  // Typography section
  // ------------------------------
  $options[]   = array(
    'name'     => 'theme_typo_section',
    'title'    => esc_html__('Typography', 'confin'),
    'icon'     => 'fa fa-header',
    'fields' => array(

      // Start fields
      array(
        'id'                  => 'typography',
        'type'                => 'group',
        'fields'              => array(
          array(
            'id'              => 'title',
            'type'            => 'text',
            'title'           => esc_html__('Title', 'confin'),
          ),
          array(
            'id'              => 'selector',
            'type'            => 'textarea',
            'title'           => esc_html__('Selector', 'confin'),
            'info'           => wp_kses( __('Enter css selectors like : <strong>body, .custom-class</strong>', 'confin'), array( 'strong' => array() ) ),
          ),
          array(
            'id'              => 'font',
            'type'            => 'typography',
            'title'           => esc_html__('Font Family', 'confin'),
          ),
          array(
            'id'              => 'size',
            'type'            => 'text',
            'title'           => esc_html__('Font Size', 'confin'),
          ),
          array(
            'id'              => 'line_height',
            'type'            => 'text',
            'title'           => esc_html__('Line-Height', 'confin'),
          ),
          array(
            'id'              => 'css',
            'type'            => 'textarea',
            'title'           => esc_html__('Custom CSS', 'confin'),
          ),
        ),
        'button_title'        => esc_html__('Add New Typography', 'confin'),
        'accordion_title'     => esc_html__('New Typography', 'confin'),
      ),

      // Subset
      array(
        'id'                  => 'subsets',
        'type'                => 'select',
        'title'               => esc_html__('Subsets', 'confin'),
        'class'               => 'chosen',
        'options'             => array(
          'latin'             => 'latin',
          'latin-ext'         => 'latin-ext',
          'cyrillic'          => 'cyrillic',
          'cyrillic-ext'      => 'cyrillic-ext',
          'greek'             => 'greek',
          'greek-ext'         => 'greek-ext',
          'vietnamese'        => 'vietnamese',
          'devanagari'        => 'devanagari',
          'khmer'             => 'khmer',
        ),
        'attributes'         => array(
          'data-placeholder' => 'Subsets',
          'multiple'         => 'multiple',
          'style'            => 'width: 200px;'
        ),
        'default'             => array( 'latin' ),
      ),

      array(
        'id'                  => 'font_weight',
        'type'                => 'select',
        'title'               => esc_html__('Font Weights', 'confin'),
        'class'               => 'chosen',
        'options'             => array(
          '100'   => esc_html__('Thin 100', 'confin'),
          '100i'  => esc_html__('Thin 100 Italic', 'confin'),
          '200'   => esc_html__('Extra Light 200', 'confin'),
          '200i'  => esc_html__('Extra Light 200 Italic', 'confin'),
          '300'   => esc_html__('Light 300', 'confin'),
          '300i'  => esc_html__('Light 300 Italic', 'confin'),
          '400'   => esc_html__('Regular 400', 'confin'),
          '400i'  => esc_html__('Regular 400 Italic', 'confin'),
          '500'   => esc_html__('Medium 500', 'confin'),
          '500i'  => esc_html__('Medium 500 Italic', 'confin'),
          '600'   => esc_html__('Semi Bold 600', 'confin'),
          '600i'  => esc_html__('Semi Bold 600 Italic', 'confin'),
          '700'   => esc_html__('Bold 700', 'confin'),
          '700i'  => esc_html__('Bold 700 Italic', 'confin'),
          '800'   => esc_html__('Extra Bold 800', 'confin'),
          '800i'  => esc_html__('Extra Bold 800 Italic', 'confin'),
          '900'   => esc_html__('Black 900', 'confin'),
          '900i'  => esc_html__('Black 900 Italic', 'confin'),
        ),
        'attributes'         => array(
          'data-placeholder' => esc_html__('Font Weight', 'confin'),
          'multiple'         => 'multiple',
          'style'            => 'width: 200px;'
        ),
        'default'             => array( '400' ),
      ),

      // Custom Fonts Upload
      array(
        'id'                 => 'font_family',
        'type'               => 'group',
        'title'              => esc_html__('Upload Custom Fonts', 'confin'),
        'button_title'       => esc_html__('Add New Custom Font', 'confin'),
        'accordion_title'    => esc_html__('Adding New Font', 'confin'),
        'accordion'          => true,
        'desc'               => esc_html__('It is simple. Only add your custom fonts and click to save. After you can check "Font Family" selector. Do not forget to Save!', 'confin'),
        'fields'             => array(

          array(
            'id'             => 'name',
            'type'           => 'text',
            'title'          => esc_html__('Font-Family Name', 'confin'),
            'attributes'     => array(
              'placeholder'  => esc_html__('for eg. Arial', 'confin')
            ),
          ),

          array(
            'id'             => 'ttf',
            'type'           => 'upload',
            'title'          => wp_kses(__('Upload .ttf <small><i>(optional)</i></small>', 'confin'), array( 'small' => array(), 'i' => array() )),
            'settings'       => array(
              'upload_type'  => 'font',
              'insert_title' => esc_html__('Use this Font-Format', 'confin'),
              'button_title' => wp_kses(__('Upload <i>.ttf</i>', 'confin'), array( 'i' => array() )),
            ),
          ),

          array(
            'id'             => 'eot',
            'type'           => 'upload',
            'title'          => wp_kses(__('Upload .eot <small><i>(optional)</i></small>', 'confin'), array( 'small' => array(), 'i' => array() )),
            'settings'       => array(
              'upload_type'  => 'font',
              'insert_title' => esc_html__('Use this Font-Format', 'confin'),
              'button_title' => wp_kses(__('Upload <i>.eot</i>', 'confin'), array( 'i' => array() )),
            ),
          ),

          array(
            'id'             => 'otf',
            'type'           => 'upload',
            'title'          => wp_kses(__('Upload .otf <small><i>(optional)</i></small>', 'confin'), array( 'small' => array(), 'i' => array() )),
            'settings'       => array(
              'upload_type'  => 'font',
              'insert_title' => esc_html__('Use this Font-Format', 'confin'),
              'button_title' => wp_kses(__('Upload <i>.otf</i>', 'confin'), array( 'i' => array() )),
            ),
          ),

          array(
            'id'             => 'woff',
            'type'           => 'upload',
            'title'          => wp_kses(__('Upload .woff <small><i>(optional)</i></small>', 'confin'), array( 'small' => array(), 'i' => array() )),
            'settings'       => array(
              'upload_type'  => 'font',
              'insert_title' => esc_html__('Use this Font-Format', 'confin'),
              'button_title' =>wp_kses(__('Upload <i>.woff</i>', 'confin'), array( 'i' => array() )),
            ),
          ),

          array(
            'id'             => 'css',
            'type'           => 'textarea',
            'title'          => wp_kses(__('Extra CSS Style <small><i>(optional)</i></small>', 'confin'), array( 'small' => array(), 'i' => array() )),
            'attributes'     => array(
              'placeholder'  => esc_html__('for eg. font-weight: normal;', 'confin'),
            ),
          ),

        ),
      ),
      // End All field

    ),
  );

  // ------------------------------
  // Pages
  // ------------------------------
  $options[] = array(
    'name'   => 'theme_pages',
    'title'  => esc_html__('Pages', 'confin'),
    'icon'   => 'fa fa-files-o'
  );


  // ------------------------------
  // Service Section
  // ------------------------------
  $options[]   = array(
    'name'     => 'service_section',
    'title'    => esc_html__('Service', 'confin'),
    'icon'     => 'fa fa-th-list',
    'fields' => array(

      // Team Start
      array(
        'type'    => 'notice',
        'class'   => 'info cs-confin-heading',
        'content' => esc_html__('Service Single', 'confin')
      ),
      array(
          'id'             => 'service_sidebar_position',
          'type'           => 'select',
          'title'          => esc_html__('Sidebar Position', 'confin'),
          'options'        => array(
            'sidebar-right' => esc_html__('Right', 'confin'),
            'sidebar-left' => esc_html__('Left', 'confin'),
            'sidebar-hide' => esc_html__('Hide', 'confin'),
          ),
          'default_option' => 'Select sidebar position',
          'info'          => esc_html__('Default option : Right', 'confin'),
        ),
        array(
          'id'             => 'single_service_widget',
          'type'           => 'select',
          'title'          => esc_html__('Sidebar Widget', 'confin'),
          'options'        => confin_registered_sidebars(),
          'default_option' => esc_html__('Select Widget', 'confin'),
          'dependency'     => array('service_sidebar_position', '!=', 'sidebar-hide'),
          'info'          => esc_html__('Default option : Main Widget Area', 'confin'),
        ),
        array(
          'id'    => 'service_comment_form',
          'type'  => 'switcher',
          'title' => esc_html__('Comment Area/Form', 'confin'),
          'info' => esc_html__('If need to hide comment area and that form on single blog page, please turn this OFF.', 'confin'),
          'default' => true,
        ),
    ),
  );

   // ------------------------------
  // Project Section
  // ------------------------------
  $options[]   = array(
    'name'     => 'project_section',
    'title'    => esc_html__('Project', 'confin'),
    'icon'     => 'fa fa-medkit',
    'fields' => array(

      // Team Start
      array(
        'type'    => 'notice',
        'class'   => 'info cs-confin-heading',
        'content' => esc_html__('Project Single', 'confin')
      ),
      array(
          'id'             => 'project_sidebar_position',
          'type'           => 'select',
          'title'          => esc_html__('Sidebar Position', 'confin'),
          'options'        => array(
            'sidebar-right' => esc_html__('Right', 'confin'),
            'sidebar-left' => esc_html__('Left', 'confin'),
            'sidebar-hide' => esc_html__('Hide', 'confin'),
          ),
          'default_option' => 'Select sidebar position',
          'info'          => esc_html__('Default option : Right', 'confin'),
        ),
        array(
          'id'             => 'single_project_widget',
          'type'           => 'select',
          'title'          => esc_html__('Sidebar Widget', 'confin'),
          'options'        => confin_registered_sidebars(),
          'default_option' => esc_html__('Select Widget', 'confin'),
          'dependency'     => array('project_sidebar_position', '!=', 'sidebar-hide'),
          'info'          => esc_html__('Default option : Main Widget Area', 'confin'),
        ),
        array(
          'id'    => 'project_comment_form',
          'type'  => 'switcher',
          'title' => esc_html__('Comment Area/Form', 'confin'),
          'info' => esc_html__('If need to hide comment area and that form on single blog page, please turn this OFF.', 'confin'),
          'default' => true,
        ),
    ),
  );

  // ------------------------------
  // Blog Section
  // ------------------------------
  $options[]   = array(
    'name'     => 'blog_section',
    'title'    => esc_html__('Blog', 'confin'),
    'icon'     => 'fa fa-edit',
    'sections' => array(

      // blog general section
      array(
        'name'     => 'blog_general_tab',
        'title'    => esc_html__('General', 'confin'),
        'icon'     => 'fa fa-cog',
        'fields'   => array(

          // Layout
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Layout', 'confin')
          ),
          array(
            'id'             => 'blog_sidebar_position',
            'type'           => 'select',
            'title'          => esc_html__('Sidebar Position', 'confin'),
            'options'        => array(
              'sidebar-right' => esc_html__('Right', 'confin'),
              'sidebar-left' => esc_html__('Left', 'confin'),
              'sidebar-hide' => esc_html__('Hide', 'confin'),
            ),
            'default_option' => 'Select sidebar position',
            'help'          => esc_html__('This style will apply, default blog pages - Like : Archive, Category, Tags, Search & Author.', 'confin'),
            'info'          => esc_html__('Default option : Right', 'confin'),
          ),
          array(
            'id'             => 'blog_widget',
            'type'           => 'select',
            'title'          => esc_html__('Sidebar Widget', 'confin'),
            'options'        => confin_registered_sidebars(),
            'default_option' => esc_html__('Select Widget', 'confin'),
            'dependency'     => array('blog_sidebar_position', '!=', 'sidebar-hide'),
            'info'          => esc_html__('Default option : Main Widget Area', 'confin'),
          ),
          // Layout
          // Global Options
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Global Options', 'confin')
          ),
          array(
            'id'         => 'theme_exclude_categories',
            'type'       => 'checkbox',
            'title'      => esc_html__('Exclude Categories', 'confin'),
            'info'      => esc_html__('Select categories you want to exclude from blog page.', 'confin'),
            'options'    => 'categories',
          ),
          array(
            'id'      => 'theme_blog_excerpt',
            'type'    => 'text',
            'title'   => esc_html__('Excerpt Length', 'confin'),
            'info'   => esc_html__('Blog short content length, in blog listing pages.', 'confin'),
            'default' => '55',
          ),
          array(
            'id'      => 'theme_metas_hide',
            'type'    => 'checkbox',
            'title'   => esc_html__('Meta\'s to hide', 'confin'),
            'info'    => esc_html__('Check items you want to hide from blog/post meta field.', 'confin'),
            'class'      => 'horizontal',
            'options'    => array(
              'category'   => esc_html__('Category', 'confin'),
              'date'    => esc_html__('Date', 'confin'),
              'author'     => esc_html__('Author', 'confin'),
              'comments'      => esc_html__('Comments', 'confin'),
            ),
            // 'default' => '30',
          ),
          // End fields

        )
      ),

      // blog single section
      array(
        'name'     => 'blog_single_tab',
        'title'    => esc_html__('Single', 'confin'),
        'icon'     => 'fa fa-sticky-note',
        'fields'   => array(

          // Start fields
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Enable / Disable', 'confin')
          ),
          array(
            'id'    => 'single_featured_image',
            'type'  => 'switcher',
            'title' => esc_html__('Featured Image', 'confin'),
            'info' => esc_html__('If need to hide featured image from single blog post page, please turn this OFF.', 'confin'),
            'default' => true,
          ),
           array(
            'id'    => 'single_author_info',
            'type'  => 'switcher',
            'title' => esc_html__('Author Info', 'confin'),
            'info' => esc_html__('If need to hide author info on single blog page, please turn this On.', 'confin'),
            'default' => false,
          ),
          array(
            'id'    => 'single_share_option',
            'type'  => 'switcher',
            'title' => esc_html__('Share Option', 'confin'),
            'info' => esc_html__('If need to hide share option on single blog page, please turn this OFF.', 'confin'),
            'default' => true,
          ),
          array(
            'id'    => 'single_post_pagination',
            'type'  => 'switcher',
            'title' => esc_html__('Hide Pagination?', 'confin'),
            'on_text' => esc_html__('Hide', 'confin'),
            'off_text' => esc_html__('Show', 'confin'),
            'default' => false,
          ),
          array(
            'id'    => 'single_comment_form',
            'type'  => 'switcher',
            'title' => esc_html__('Comment Area/Form ?', 'confin'),
            'info' => esc_html__('If need to hide comment area and that form on single blog page, please turn this On.', 'confin'),
            'default' => false,
          ),
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Sidebar', 'confin')
          ),
          array(
            'id'             => 'single_sidebar_position',
            'type'           => 'select',
            'title'          => esc_html__('Sidebar Position', 'confin'),
            'options'        => array(
              'sidebar-right' => esc_html__('Right', 'confin'),
              'sidebar-left' => esc_html__('Left', 'confin'),
              'sidebar-hide' => esc_html__('Hide', 'confin'),
            ),
            'default_option' => 'Select sidebar position',
            'info'          => esc_html__('Default option : Right', 'confin'),
          ),
          array(
            'id'             => 'single_blog_widget',
            'type'           => 'select',
            'title'          => esc_html__('Sidebar Widget', 'confin'),
            'options'        => confin_registered_sidebars(),
            'default_option' => esc_html__('Select Widget', 'confin'),
            'dependency'     => array('single_sidebar_position', '!=', 'sidebar-hide'),
            'info'          => esc_html__('Default option : Main Widget Area', 'confin'),
          ),
          // End fields

        )
      ),

    ),
  );

  // ------------------------------
  // Extra Pages
  // ------------------------------
  $options[]   = array(
    'name'     => 'theme_extra_pages',
    'title'    => esc_html__('Extra Pages', 'confin'),
    'icon'     => 'fa fa-clone',
    'sections' => array(

      // error 404 page
      array(
        'name'     => 'error_page_section',
        'title'    => esc_html__('404 Page', 'confin'),
        'icon'     => 'fa fa-exclamation-triangle',
        'fields'   => array(

          // Start 404 Page
          array(
            'id'    => 'error_heading',
            'type'  => 'text',
            'title' => esc_html__('404 Page Heading', 'confin'),
            'info'  => esc_html__('Enter 404 page heading.', 'confin'),
          ),
          array(
            'id'    => 'error_subheading',
            'type'  => 'textarea',
            'title' => esc_html__('404 Page Sub Heading', 'confin'),
            'info'  => esc_html__('Enter 404 page Sub heading.', 'confin'),
          ),
          array(
            'id'    => 'error_page_content',
            'type'  => 'textarea',
            'title' => esc_html__('404 Page Content', 'confin'),
            'info'  => esc_html__('Enter 404 page content.', 'confin'),
            'shortcode' => true,
          ),
          array(
            'id'    => 'error_page_bg',
            'type'  => 'image',
            'title' => esc_html__('404 Page Background', 'confin'),
            'info'  => esc_html__('Choose 404 page background styles.', 'confin'),
            'add_title' => esc_html__('Add 404 Image', 'confin'),
          ),
          array(
            'id'    => 'error_btn_text',
            'type'  => 'text',
            'title' => esc_html__('Button Text', 'confin'),
            'info'  => esc_html__('Enter BACK TO HOME button text. If you want to change it.', 'confin'),
          ),
          // End 404 Page

        ) // end: fields
      ), // end: fields section

      // maintenance mode page
      array(
        'name'     => 'maintenance_mode_section',
        'title'    => esc_html__('Maintenance Mode', 'confin'),
        'icon'     => 'fa fa-hourglass-half',
        'fields'   => array(

          // Start Maintenance Mode
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('If you turn this ON : Only Logged in users will see your pages. All other visiters will see, selected page of : <strong>Maintenance Mode Page</strong>', 'confin')
          ),
          array(
            'id'             => 'enable_maintenance_mode',
            'type'           => 'switcher',
            'title'          => esc_html__('Maintenance Mode', 'confin'),
            'default'        => false,
          ),
          array(
            'id'             => 'maintenance_mode_page',
            'type'           => 'select',
            'title'          => esc_html__('Maintenance Mode Page', 'confin'),
            'options'        => 'pages',
            'default_option' => esc_html__('Select a page', 'confin'),
            'dependency'   => array( 'enable_maintenance_mode', '==', 'true' ),
          ),
          array(
            'id'             => 'maintenance_mode_title',
            'type'           => 'text',
            'title'          => esc_html__('Maintenance Mode Text', 'confin'),
            'dependency'   => array( 'enable_maintenance_mode', '==', 'true' ),
          ),
          array(
            'id'             => 'maintenance_mode_text',
            'type'           => 'textarea',
            'title'          => esc_html__('Maintenance Mode Text', 'confin'),
            'dependency'   => array( 'enable_maintenance_mode', '==', 'true' ),
          ),
          array(
            'id'             => 'maintenance_mode_bg',
            'type'           => 'background',
            'title'          => esc_html__('Page Background', 'confin'),
            'dependency'   => array( 'enable_maintenance_mode', '==', 'true' ),
          ),
          // End Maintenance Mode

        ) // end: fields
      ), // end: fields section

    )
  );

  // ------------------------------
  // Advanced
  // ------------------------------
  $options[] = array(
    'name'   => 'theme_advanced',
    'title'  => esc_html__('Advanced', 'confin'),
    'icon'   => 'fa fa-cog'
  );

  // ------------------------------
  // Misc Section
  // ------------------------------
  $options[]   = array(
    'name'     => 'misc_section',
    'title'    => esc_html__('Misc', 'confin'),
    'icon'     => 'fa fa-recycle',
    'sections' => array(

      // custom sidebar section
      array(
        'name'     => 'custom_sidebar_section',
        'title'    => esc_html__('Custom Sidebar', 'confin'),
        'icon'     => 'fa fa-reorder',
        'fields'   => array(

          // start fields
          array(
            'id'              => 'custom_sidebar',
            'title'           => esc_html__('Sidebars', 'confin'),
            'desc'            => esc_html__('Go to Appearance -> Widgets after create sidebars', 'confin'),
            'type'            => 'group',
            'fields'          => array(
              array(
                'id'          => 'sidebar_name',
                'type'        => 'text',
                'title'       => esc_html__('Sidebar Name', 'confin'),
              ),
              array(
                'id'          => 'sidebar_desc',
                'type'        => 'text',
                'title'       => esc_html__('Custom Description', 'confin'),
              )
            ),
            'accordion'       => true,
            'button_title'    => esc_html__('Add New Sidebar', 'confin'),
            'accordion_title' => esc_html__('New Sidebar', 'confin'),
          ),
          // end fields

        )
      ),
      // custom sidebar section

      // Custom CSS/JS
      array(
        'name'        => 'custom_css_js_section',
        'title'       => esc_html__('Custom Codes', 'confin'),
        'icon'        => 'fa fa-code',

        // begin: fields
        'fields'      => array(
          // Start Custom CSS/JS
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Custom JS', 'confin')
          ),
          array(
            'id'             => 'theme_custom_js',
            'type'           => 'textarea',
            'attributes' => array(
              'rows'     => 10,
              'placeholder'     => esc_html__('Enter your JS code here...', 'confin'),
            ),
          ),
          // End Custom CSS/JS

        ) // end: fields
      ),

      // Translation
      array(
        'name'        => 'theme_translation_section',
        'title'       => esc_html__('Translation', 'confin'),
        'icon'        => 'fa fa-language',

        // begin: fields
        'fields'      => array(

          // Start Translation
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Common Texts', 'confin')
          ),
          array(
            'id'          => 'read_more_text',
            'type'        => 'text',
            'title'       => esc_html__('Read More Text', 'confin'),
          ),
          array(
            'id'          => 'view_more_text',
            'type'        => 'text',
            'title'       => esc_html__('View More Text', 'confin'),
          ),
          array(
            'id'          => 'share_text',
            'type'        => 'text',
            'title'       => esc_html__('Share Text', 'confin'),
          ),
          array(
            'id'          => 'share_on_text',
            'type'        => 'text',
            'title'       => esc_html__('Share On Tooltip Text', 'confin'),
          ),
          array(
            'id'          => 'author_text',
            'type'        => 'text',
            'title'       => esc_html__('Author Text', 'confin'),
          ),
          array(
            'id'          => 'post_comment_text',
            'type'        => 'text',
            'title'       => esc_html__('Post Comment Text [Submit Button]', 'confin'),
          ),
          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('WooCommerce', 'confin')
          ),
          array(
            'id'          => 'add_to_cart_text',
            'type'        => 'text',
            'title'       => esc_html__('Add to Cart Text', 'confin'),
          ),
          array(
            'id'          => 'details_text',
            'type'        => 'text',
            'title'       => esc_html__('Details Text', 'confin'),
          ),

          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Pagination', 'confin')
          ),
          array(
            'id'          => 'older_post',
            'type'        => 'text',
            'title'       => esc_html__('Older Posts Text', 'confin'),
          ),
          array(
            'id'          => 'newer_post',
            'type'        => 'text',
            'title'       => esc_html__('Newer Posts Text', 'confin'),
          ),

          array(
            'type'    => 'notice',
            'class'   => 'info cs-confin-heading',
            'content' => esc_html__('Single Portfolio Pagination', 'confin')
          ),
          array(
            'id'          => 'prev_port',
            'type'        => 'text',
            'title'       => esc_html__('Prev Case Text', 'confin'),
          ),
          array(
            'id'          => 'next_port',
            'type'        => 'text',
            'title'       => esc_html__('Next Case Text', 'confin'),
          ),
          // End Translation

        ) // end: fields
      ),

    ),
  );

  
  // ------------------------------
  // backup                       -
  // ------------------------------
  $options[]   = array(
    'name'     => 'backup_section',
    'title'    => 'Backup',
    'icon'     => 'fa fa-shield',
    'fields'   => array(

      array(
        'type'    => 'notice',
        'class'   => 'warning',
        'content' => esc_html__('You can save your current options. Download a Backup and Import.', 'confin'),
      ),

      array(
        'type'    => 'backup',
      ),

    )
  );

  return $options;

}
add_filter( 'cs_framework_options', 'confin_options' );