<?php
/**
 * zev Theme Customizer
 *
 * @package zev
 */

function themesflat_customize_register( $wp_customize ) {
    $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
    $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
    $wp_customize->get_section( 'header_image' )->title = esc_html__('Backgound PageTitle', 'zev');
    $wp_customize->get_section( 'header_image' )->priority = '22';   
    $wp_customize->get_section( 'title_tagline' )->priority = '1';
    $wp_customize->get_section( 'title_tagline' )->title = esc_html__('General', 'zev');
    $wp_customize->get_section( 'colors' )->title = esc_html__('Layout Style', 'zev');  
    $wp_customize->remove_control('display_header_text');
    $wp_customize->remove_control('header_textcolor');
    $wp_customize->remove_control('background_color');
    remove_theme_support( 'custom-header' );
  
    //Heading
    class themesflat_Info extends WP_Customize_Control {
        public $type = 'heading';
        public $label = '';
        public function render_content() {
        ?>
            <h3 class="themesflat-title-control"><?php echo esc_html( $this->label ); ?></h3>
        <?php
        }
    }    

    //Title
    class themesflat_Title_Info extends WP_Customize_Control {
        public $type = 'title';
        public $label = '';
        public function render_content() {
        ?>
            <h4><?php echo esc_html( $this->label ); ?></h4>
        <?php
        }
    }    

    //Desc
    class themesflat_Theme_Info extends WP_Customize_Control {
        public $type = 'info';
        public $label = '';
        public function render_content() {
        ?>
            <h3><?php echo esc_html( $this->label ); ?></h3>
        <?php
        }
    }    

    //Desc
    class themesflat_Desc_Info extends WP_Customize_Control {
        public $type = 'desc';
        public $label = '';
        public function render_content() {
        ?>
            <p class="themesflat-desc-control"><?php echo esc_html( $this->label ); ?></p>
        <?php
        }
    }       

    //___General___//
    $wp_customize->add_setting('themesflat_options[info]', array(
            'type'              => 'info_control',
            'capability'        => 'edit_theme_options',
            'sanitize_callback' => 'esc_attr',            
        )
    );

    // Heading site infomation
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-stie-infomation', array(
        'label' => esc_html__('SITE INFORMATION', 'zev'),
        'section' => 'title_tagline',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );    

    // Desc site infomaton
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_siteinfomation', array(
        'label' => esc_html__('This section have basic information of your site, just change it to match with you need.', 'zev'),
        'section' => 'title_tagline',
        'settings' => 'themesflat_options[info]',
        'priority' => 2
        ) )
    );

    // Enable Smooth Scroll
    $wp_customize->add_setting(
      'enable_smooth_scroll',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('enable_smooth_scroll'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'enable_smooth_scroll',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Enable Smooth Scroll', 'zev'),
            'section' => 'title_tagline',
            'priority' => 3,
        ))
    );

    // Enable Preload
    $wp_customize->add_setting(
      'enable_preload',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('enable_preload'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'enable_preload',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Enable Preload', 'zev'),
            'section' => 'title_tagline',
            'priority' => 4,
        ))
    );

    // Preload
    $wp_customize->add_setting(
        'preload',
        array(
            'default'           => themesflat_customize_default('preload'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_RadioImages($wp_customize,
        'preload',
        array (
            'type'      => 'radio-images',           
            'section'   => 'title_tagline',
            'priority'  => 5,
            'label'         => esc_html__('Preload', 'zev'),
            'choices'   => array (
                'preload-1' => array (
                    'tooltip'   => esc_html__( 'Circle Loaders 1','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-1.png'
                ) ,
                'preload-2'=>  array (
                    'tooltip'   => esc_html__( 'Circle Loaders 2','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-2.png'
                ) ,
                'preload-3'=>  array (
                    'tooltip'   => esc_html__( 'Circle Loaders 3','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-3.png'
                ) ,
                'preload-4'=>  array (
                    'tooltip'   => esc_html__( 'Circle Loaders 4','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-4.png'
                ) ,
                'preload-5'=>  array (
                    'tooltip'   => esc_html__( 'Spinner Loaders','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-5.png'
                ) ,
                'preload-6'=>  array (
                    'tooltip'   => esc_html__( 'Pulse Loaders','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-6.png'
                ) ,
                'preload-7'=>  array (
                    'tooltip'   => esc_html__( 'Square Loaders','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-7.png'
                ) ,
                'preload-8'=>  array (
                    'tooltip'   => esc_html__( 'Line Loaders','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/preload-8.png'
                ) ,
            ),
        ))
    );

    //__social links__//
    $wp_customize->add_section(
        'themesflat_socials',
        array(
            'title'         => esc_html__('Socials', 'zev'),
            'priority'      => 2,
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );    

    //Socials
    $wp_customize->add_setting(
      'social_links',
      array(
        'sanitize_callback' => 'esc_attr',
        'default' => themesflat_customize_default('social_links'),     
      )   
    );
    $wp_customize->add_control( new themesflat_SocialIcons($wp_customize,
        'social_links',
        array(
            'type' => 'social-icons',
            'label' => esc_html__('Social', 'zev'),
            'section' => 'themesflat_socials',
            'priority' => 1,
        ))
    ); 

    // Social Share
    $wp_customize->add_setting(
      'show_social_share',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('show_social_share'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_social_share',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Social Share', 'zev'),
            'description'   => esc_html__('Social share only visible on detail pages ( Blog Detail, Portfolio Detail )', 'zev'),
            'section' => 'themesflat_socials',
            'priority' => 2,
        ))
    ); 

    //___Header___//
    $wp_customize->add_section(
        'themesflat_header',
        array(
            'title'         => esc_html__('Header', 'zev'),
            'priority'      => 2,
        )
    );

    // Heading custom logo
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-logo', array(
        'label' => esc_html__('Custom Logo', 'zev'),
        'section' => 'themesflat_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 2
        ) )
    );   
    // Desc custon logo
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_logo', array(
        'label' => esc_html__('In this section You can upload your own custom logo, change the way your logo can be displayed', 'zev'),
        'section' => 'themesflat_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 3
        ) )
    );    

    //Logo
    $wp_customize->add_setting(
        'site_logo',
        array(
            'default' => themesflat_customize_default('site_logo'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'site_logo',
            array(
               'label'          => esc_html__( 'Upload Your Logo ', 'zev' ),
               'description'    => esc_html__( 'If you don\'t display logo please remove it your website display 
                Site Title default in General', 'zev' ),
               'type'           => 'image',
               'section'        => 'themesflat_header',
               'priority'       => 4,
            )
        )
    );

    //Logo Sticky
    $wp_customize->add_setting(
        'site_logo_sticky',
        array(
            'default' => themesflat_customize_default('site_logo_sticky'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'site_logo_sticky',
            array(
               'label'          => esc_html__( 'Upload Your Logo Sticky ', 'zev' ),
               'type'           => 'image',
               'section'        => 'themesflat_header',
               'priority'       => 4,
            )
        )
    );

    //Logo
    $wp_customize->add_setting(
        'site_logo_mobile',
        array(
            'default' => themesflat_customize_default('site_logo_mobile'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'site_logo_mobile',
            array(
               'label'          => esc_html__( 'Upload Your Logo On Mobile', 'zev' ),
               'description'    => esc_html__( 'If you don\'t display logo please remove it your website display 
                Site Title default in General', 'zev' ),
               'type'           => 'image',
               'section'        => 'themesflat_header',
               'priority'       => 4,
            )
        )
    );

    // Logo Size    
    $wp_customize->add_setting(
        'logo_width',
        array(
            'default'   =>  themesflat_customize_default('logo_width'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_Slide_Control( $wp_customize,
        'logo_width',
            array(
                'type'      =>  'slide-control',
                'section'   =>  'themesflat_header',
                'label'     =>  'Logo Size Width(px)',
                'priority'  => 5,
                'input_attrs' => array(
                    'min' => 0,
                    'max' => 500,
                    'step' => 1,
                ),
            )

        )
    );

    // Logo Box control
    $wp_customize->add_setting(
        'logo_controls',
        array(
            'default' => themesflat_customize_default('logo_controls'),
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );
    $wp_customize->add_control( new themesflat_BoxControls($wp_customize,
        'logo_controls',
        array(
            'label' => esc_html__( 'Logo Box Controls (px)', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'box-controls',
            'priority' => 5
        ))
    );

    // Heading custom logo
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-header', array(
        'label' => esc_html__('Custom Header', 'zev'),
        'section' => 'themesflat_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 6
        ) )
    );

    // Enable Header Absolute
    $wp_customize->add_setting(
      'header_absolute',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('header_absolute'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'header_absolute',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Header Absolute', 'zev'),
            'section' => 'themesflat_header',
            'priority' => 6,
        ))
    );

    // Enable Header Sticky
    $wp_customize->add_setting(
      'header_sticky',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('header_sticky'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'header_sticky',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Header Sticky', 'zev'),
            'section' => 'themesflat_header',
            'priority' => 7,
        ))
    ); 

    // Enable Menu One Page
    $wp_customize->add_setting(
      'menu_one_page',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('menu_one_page'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'menu_one_page',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Menu One Page', 'zev'),
            'section' => 'themesflat_header',
            'priority' => 7,
        ))
    );    

    $wp_customize->add_setting(
        'style_header',
        array(
            'default'           => themesflat_customize_default('style_header'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_RadioImages($wp_customize,
        'style_header',
        array (
            'type'      => 'radio-images',           
            'section'   => 'themesflat_header',
            'priority'  => 9,
            'label'         => esc_html__('Header Style', 'zev'),
            'choices'   => array (
                'header-style1' => array (
                    'tooltip'   => esc_html__( 'Header Style 1','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/header1.jpg'
                ),
                'header-style2'=>  array (
                    'tooltip'   => esc_html__( 'Header Style 2','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/header2.jpg'
                ),
                'header-style3'=>  array (
                    'tooltip'   => esc_html__( 'Header Style 3 ( Menu Right )','zev' ),
                    'src'       => THEMESFLAT_LINK . 'images/controls/header3.jpg'
                ),
            ),
        ))
    );

    // Show search 
    $wp_customize->add_setting(
      'header_search_box',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('header_search_box'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'header_search_box',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Search Header', 'zev'),
            'section' => 'themesflat_header',
            'priority' => 10,
        ))
    );

    // Header Info Icon Mail
    $wp_customize->add_setting(
        'header_info_icon_mail',
        array(
            'default' => themesflat_customize_default('header_info_icon_mail'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_icon_mail',
        array(
            'label' => esc_html__( 'Info Icon Mail', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );
    // Header Info Icon Mail
    $wp_customize->add_setting(
        'header_info_text_mail',
        array(
            'default' => themesflat_customize_default('header_info_text_mail'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_text_mail',
        array(
            'label' => esc_html__( 'Info Icon Mail', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );

    // Header Info Icon Phone
    $wp_customize->add_setting(
        'header_info_icon_phone',
        array(
            'default' => themesflat_customize_default('header_info_icon_phone'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_icon_phone',
        array(
            'label' => esc_html__( 'Info Icon Phone', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );
    // Header Info Icon Phone
    $wp_customize->add_setting(
        'header_info_text_phone',
        array(
            'default' => themesflat_customize_default('header_info_text_phone'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_text_phone',
        array(
            'label' => esc_html__( 'Info Icon Phone', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );

    // Header Info Icon Address
    $wp_customize->add_setting(
        'header_info_icon_address',
        array(
            'default' => themesflat_customize_default('header_info_icon_address'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_icon_address',
        array(
            'label' => esc_html__( 'Info Icon Address', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );
    // Header Info Icon Mail
    $wp_customize->add_setting(
        'header_info_text_address',
        array(
            'default' => themesflat_customize_default('header_info_text_address'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_info_text_address',
        array(
            'label' => esc_html__( 'Info Text Address', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );

    // Header Button Text
    $wp_customize->add_setting(
        'header_button_text',
        array(
            'default' => themesflat_customize_default('header_button_text'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_button_text',
        array(
            'label' => esc_html__( 'Header Button Text (Only Header Style 3)', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );
    // Header Button URL
    $wp_customize->add_setting(
        'header_button_url',
        array(
            'default' => themesflat_customize_default('header_button_url'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'header_button_url',
        array(
            'label' => esc_html__( 'Header Button URL (Only Header Style 3)', 'zev' ),
            'section' => 'themesflat_header',
            'type' => 'text',
            'priority' => 11
        )
    );
    
   //___Footer___//
    $wp_customize->add_section(
        'flat_footer',
        array(
            'title'         => esc_html__('Footer', 'zev'),
            'priority'      => 4,
        )
    );        

    $wp_customize->remove_control('display_header_text');
    $wp_customize->remove_control('header_textcolor');

    // Action Box
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-action-box-footer', array(
        'label' => esc_html__('Action Box', 'zev'),
        'section' => 'flat_footer',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    ); 
    
    $wp_customize->add_setting(
        'show_action_box',
        array(
            'default'   => themesflat_customize_default('show_action_box'),
            'sanitize_callback'  => 'themesflat_sanitize_checkbox',
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
            'show_action_box',
            array(
                'type'      => 'checkbox',
                'label'     => 'Show Action Box',
                'section'   => 'flat_footer',
                'priority'  => 2
            )
        )
    );

    $wp_customize->add_setting(
        'text_action_box',
        array(
            'default'   =>  themesflat_customize_default('text_action_box'),
            'sanitize_callback'  =>  'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'text_action_box',
        array(
            'type'      =>  'textarea',
            'label'     =>  'Text Action Box Ex: <h3>The title</h3><p>The content</p>',
            'section'   =>  'flat_footer',
            'priority'  =>  3
        )
    );

    $wp_customize->add_setting(
        'text_button_action_box',
        array(
            'default'   =>  themesflat_customize_default('text_button_action_box'),
            'sanitize_callback'  =>  'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'text_button_action_box',
        array(
            'type'      =>  'text',
            'section'   =>  'flat_footer',
            'label'     =>  'Text Button Action Box',
            'priority'  => 4
        )
    );

    // Partner
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-partner-footer', array(
        'label' => esc_html__('Partner Box', 'zev'),
        'section' => 'flat_footer',
        'settings' => 'themesflat_options[info]',
        'priority' => 5
        ) )
    ); 
    
    $wp_customize->add_setting(
        'show_partner',
        array(
            'default'   => themesflat_customize_default('show_partner'),
            'sanitize_callback'  => 'themesflat_sanitize_checkbox',
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
            'show_partner',
            array(
                'type'      => 'checkbox',
                'label'     => 'Show Partner',
                'section'   => 'flat_footer',
                'priority'  => 6
            )
        )
    );    

    // Partner Image
    $wp_customize->add_setting(
        'img_partner',
        array(
            'default'           => themesflat_customize_default('img_partner'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    $wp_customize->add_control(
        new themesflat_MultiImages(
            $wp_customize,
            'img_partner',
            array(
               'label'          => esc_html__( 'Upload Your Partner Image', 'zev' ),
               'type'           => 'multi-image',
               'section'        => 'flat_footer',
               'priority'       => 7,
            )
        )
    );

    // Partner Show Item
    $wp_customize->add_setting(
        'partner_show_item',
        array(
            'sanitize_callback' => 'absint',
            'default'           => themesflat_customize_default('partner_show_item'),
        )       
    );
    $wp_customize->add_control( 'partner_show_item', array(
        'type'        => 'number',
        'priority'    => 7,
        'section'     => 'flat_footer',
        'label'       => esc_html__('Show Item', 'zev'),
        'input_attrs' => array(
            'min'   => 1,
            'max'   => 10,
            'step'  => 1,   
        ),
    ) );    

    // Partner Loop
    $wp_customize->add_setting(
        'partner_loop',
        array(
            'default'           => themesflat_customize_default('partner_loop'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'partner_loop',
        array(
            'type'      => 'select',           
            'section'   => 'flat_footer',
            'priority'  => 7,
            'label'     => esc_html__('Carousel Loop', 'zev'),
            'choices'   => array(                
                'true'     => esc_html__( 'Yes', 'zev' ),
                'false'    => esc_html__( 'No', 'zev' ),                 
            )
        )
    );

    // Partner Box control
    $wp_customize->add_setting(
        'partner_box_controls',
        array(
            'default' => themesflat_customize_default('partner_box_controls'),
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );
    $wp_customize->add_control( new themesflat_BoxControls($wp_customize,
        'partner_box_controls',
        array(
            'label' => esc_html__( 'Partner Box Controls (px)', 'zev' ),
            'section' => 'flat_footer',
            'type' => 'box-controls',
            'priority' => 8,
        ))
    );

    // Footer widget
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-widget-footer', array(
        'label' => esc_html__('footer widgets', 'zev'),
        'section' => 'flat_footer',
        'settings' => 'themesflat_options[info]',
        'priority' => 9
        ) )
    );

    // Desc
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_widget_footer', array(
        'label' => esc_html__('This section allow to change the layout and styles of footer widgets to match as you need', 'zev'),
        'section' => 'flat_footer',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    );

    // Show Footer
    $wp_customize->add_setting ( 
        'show_footer',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox' ,
            'default' => themesflat_customize_default('show_footer'),     
        )
    );

    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_footer',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html('Show Footer', 'zev'),
            'section'   => 'flat_footer',
            'priority'  => 11
        ))
    ); 

    // Columns Footer
    $wp_customize->add_setting(
        'footer_widget_areas',
        array(
            'default'           => themesflat_customize_default('footer_widget_areas'),
            'sanitize_callback' => 'themesflat_sanitize_grid_post_related',
        )
    );
    $wp_customize->add_control(
        'footer_widget_areas',
        array(
            'type'      => 'select',           
            'section'   => 'flat_footer',
            'priority'  => 14,
            'label'     => esc_html__('Columns Footer', 'zev'),
            'choices'   => array(                
                1     => esc_html__( '1 Columns', 'zev' ),
                2     => esc_html__( '2 Columns', 'zev' ),
                3     => esc_html__( '3 Columns', 'zev' ),
                4     => esc_html__( '4 Columns ( 3 | 2 | 3 | 4 )', 'zev' ),
                5     => esc_html__( '4 Columns ( 3 | 3 | 3 | 3 )', 'zev' ),                  
            )
        )
    ); 

    // Footer Box control
    $wp_customize->add_setting(
        'footer_controls',
        array(
            'default' => themesflat_customize_default('footer_controls'),
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );
    $wp_customize->add_control( new themesflat_BoxControls($wp_customize,
        'footer_controls',
        array(
            'label' => esc_html__( 'Footer Box Controls (px)', 'zev' ),
            'section' => 'flat_footer',
            'type' => 'box-controls',
            'priority' => 14
        ))
    );

    // Footer title
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-footer-content', array(
        'label' => esc_html__('BOTTOM', 'zev'),
        'section' => 'flat_footer',
        'settings' => 'themesflat_options[info]',
        'priority' => 14
        ) )
    );

    // Show Bottom
    $wp_customize->add_setting ( 
        'show_bottom',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox' ,
            'default' => themesflat_customize_default('show_bottom'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_bottom',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Bottom', 'zev'),
            'section'   => 'flat_footer',
            'priority'  => 21
        ))
    );
      
    // Footer Copyright
    $wp_customize->add_setting(
        'footer_copyright',
        array(
            'default' => themesflat_customize_default('footer_copyright'),
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'footer_copyright',
        array(
            'label' => esc_html__( 'Copyright', 'zev' ),
            'section' => 'flat_footer',
            'type' => 'textarea',
            'priority' => 19
        )
    );    

    //__Color__//
    $wp_customize->add_panel('color_panel',array(
        'title'         => 'Color',
        'description'   => 'This is panel Description',
        'priority'      => 10,
    ));

    // ADD SECTION GENERAL
    $wp_customize->add_section('color_general',array(
        'title'         => 'General',
        'priority'      => 10,
        'panel'         => 'color_panel',
    ));

    // Heading Color Scheme
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'color_scheme', array(
        'label' => esc_html__('SCHEME COLOR', 'zev'),
        'section' => 'color_general',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );    

    // Desc color scheme
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_color_schemer', array(
        'label' => esc_html__('Select the color that will be used for theme color.','zev'),
        'section' => 'color_general',
        'settings' => 'themesflat_options[info]',
        'priority' => 2
        ) )
    ); 

    $wp_customize->add_setting(
        'primary_color',
        array(
            'default'           => themesflat_customize_default('primary_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'primary_color',
            array(
                'label'         => esc_html__('Scheme Color Gradient', 'zev'),
                'description'   => esc_html__('Primary Color', 'zev'),
                'section'       => 'color_general',
                'settings'      => 'primary_color',
                'priority'      => 3
            )
        )
    );
    $wp_customize->add_setting(
        'second_color',
        array(
            'default'           => themesflat_customize_default('second_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'second_color',
            array(
                'description'   => esc_html__('Second Color', 'zev'),
                'section'       => 'color_general',
                'settings'      => 'second_color',
                'priority'      => 3
            )
        )
    ); 

    $wp_customize->add_setting(
        'accent_color',
        array(
            'default'           => themesflat_customize_default('accent_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'accent_color',
            array(
                'label'         => esc_html__('Accent Color', 'zev'),
                'section'       => 'color_general',
                'settings'      => 'accent_color',
                'priority'      => 3
            )
        )
    );   

    // Body Color
    $wp_customize->add_setting(
        'body_text_color',
        array(
            'default'           => themesflat_customize_default('body_text_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'body_text_color',
            array(
                'label'         => esc_html__('Body Color', 'zev'),
                'section'       => 'color_general',
                'settings'      => 'body_text_color',
                'priority'      => 4
            )
        )
    );

    // ADD SECTION HEADER COLOR
    $wp_customize->add_section('color_topbar',array(
        'title'=>'Topbar',
        'priority'=>10,
        'panel'=>'color_panel',
    )); 

      

    // ADD SECTION HEADER COLOR
    $wp_customize->add_section('color_header',array(
        'title'=>'Header',
        'priority'=>11,
        'panel'=>'color_panel',
    ));    

    // HEADER COLOR
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'header_color', array(
        'label' => esc_html__('HEADER COLOR', 'zev'),
        'section' => 'color_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 3
        ) )
    ); 

    // Menu Background
    $wp_customize->add_setting(
        'header_backgroundcolor',
        array(
            'default'           => themesflat_customize_default('header_backgroundcolor'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'header_backgroundcolor',
            array(
                'label'         => esc_html__('Header Background', 'zev'),
                'description'   => esc_html__(' Opacity =1 for Background Color', 'zev'),
                'section'       => 'color_header',
                'priority'      => 4
            )
        )
    );

    // MENU COLOR
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'menu_color', array(
        'label' => esc_html__('MENU COLOR', 'zev'),
        'section' => 'color_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 5
        ) )
    );  

    // Menu a color
    $wp_customize->add_setting(
        'mainnav_color',
        array(
            'default'           => themesflat_customize_default('mainnav_color'),
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'mainnav_color',
            array(
                'label' => esc_html__('Mainnav link color', 'zev'),
                'section' => 'color_header',
                'priority' => 6
            )
        )
    );

    // Menu a:hover color
    $wp_customize->add_setting(
        'mainnav_hover_color',
        array(
            'default'           => themesflat_customize_default('mainnav_hover_color'),
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'mainnav_hover_color',
            array(
                'label' => esc_html__('Mainnav link hover & active color', 'zev'),
                'section' => 'color_header',
                'priority' => 7
            )
        )
    );

    // Sub menu a color
    $wp_customize->add_setting(
        'sub_nav_color',
        array(
            'default'           => themesflat_customize_default('sub_nav_color'),
            'sanitize_callback' => 'esc_attr'
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'sub_nav_color',
            array(
                'label' => esc_html__('Sub nav link color', 'zev'),
                'section' => 'color_header',
                'priority' => 8
            )
        )
    );

    // Sub nav background
    $wp_customize->add_setting(
        'sub_nav_background',
        array(
            'default'           => themesflat_customize_default('sub_nav_background'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'sub_nav_background',
            array(
                'label' => esc_html__('Sub nav link background color', 'zev'),
                'section' => 'color_header',
                'priority' => 9
            )
        )
    );    

    // Sub nav background hover
    $wp_customize->add_setting(
        'sub_nav_color_hover',
        array(
            'default'   => themesflat_customize_default('sub_nav_color_hover'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'sub_nav_color_hover',
            array(
                'label' => esc_html__('Sub nav link hover & active color', 'zev'),
                'section' => 'color_header',
                'priority' => 10
            )
        )
    );

    // Sub nav background hover
    $wp_customize->add_setting(
        'sub_nav_background_hover',
        array(
            'default'   => themesflat_customize_default('sub_nav_background_hover'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'sub_nav_background_hover',
            array(
                'label' => esc_html__('Sub nav link hover & active background color', 'zev'),
                'section' => 'color_header',
                'priority' => 11
            )
        )
    );

    // Sub nav line color between link
    $wp_customize->add_setting(
        'sub_nav_border_color',
        array(
            'default'           => themesflat_customize_default('sub_nav_border_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'sub_nav_border_color',
            array(
                'label' => esc_html__('Sub nav line color between link', 'zev'),
                'section' => 'color_header',
                'priority' => 12
            )
        )
    );

    // HEADER STICKY
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'header_sticky_color', array(
        'label' => esc_html__('MENU STICKY', 'zev'),
        'section' => 'color_header',
        'settings' => 'themesflat_options[info]',
        'priority' => 20
        ) )
    );
    // Header Background sticky
    $wp_customize->add_setting(
        'header_backgroundcolor_sticky',
        array(
            'default'           => themesflat_customize_default('header_backgroundcolor_sticky'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'header_backgroundcolor_sticky',
            array(
                'label'         => esc_html__('Sticky Header Background', 'zev'),
                'section'       => 'color_header',
                'priority'      => 21
            )
        )
    );
    // Header color sticky
    $wp_customize->add_setting(
        'header_color_sticky',
        array(
            'default'           => themesflat_customize_default('header_color_sticky'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'header_color_sticky',
            array(
                'label'         => esc_html__('Sticky Header Color', 'zev'),
                'section'       => 'color_header',
                'priority'      => 22
            )
        )
    );
    // Header color sticky
    $wp_customize->add_setting(
        'header_color_sticky_hover',
        array(
            'default'           => themesflat_customize_default('header_color_sticky_hover'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'header_color_sticky_hover',
            array(
                'label'         => esc_html__('Sticky Header Color Hover', 'zev'),
                'section'       => 'color_header',
                'priority'      => 23
            )
        )
    );

    // ADD SECTION COLOR ACTION BOX
    $wp_customize->add_section('color_action_box',array(
        'title'=>'Action Box',
        'priority'=> 12,
        'panel'=>'color_panel',
    ));

    //Action box Background
    $wp_customize->add_setting(
        'action_box_background_image',
        array(
            'default' => themesflat_customize_default('action_box_background_image'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'action_box_background_image',
            array(
               'label'          => esc_html__( 'Upload Your Background Image', 'zev' ),
               'type'           => 'image',
               'section'        => 'color_action_box',
               'priority'       => 12,
            )
        )
    );

    // Action Box background color    
    $wp_customize->add_setting(
        'action_box_background_color',
        array(
            'default'           => themesflat_customize_default('action_box_background_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'action_box_background_color',
            array(
                'label'         => esc_html__('Action Box Backgound', 'zev'),
                'section'       => 'color_action_box',
                'settings'      => 'action_box_background_color',
                'priority'      => 12
            )
        )
    );

    // Action Box Heading color    
    $wp_customize->add_setting(
        'action_box_heading_color',
        array(
            'default'           => themesflat_customize_default('action_box_heading_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'action_box_heading_color',
            array(
                'label'         => esc_html__('Action Box Heading Color', 'zev'),
                'section'       => 'color_action_box',
                'settings'      => 'action_box_heading_color',
                'priority'      => 12
            )
        )
    );   

    // Action Box Text color    
    $wp_customize->add_setting(
        'action_box_text_color',
        array(
            'default'           => themesflat_customize_default('action_box_text_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'action_box_text_color',
            array(
                'label'         => esc_html__('Action Box Text Color', 'zev'),
                'section'       => 'color_action_box',
                'settings'      => 'action_box_text_color',
                'priority'      => 12
            )
        )
    );

    // Action Box Button Text Color    
    $wp_customize->add_setting(
        'action_box_button_text_color',
        array(
            'default'           => themesflat_customize_default('action_box_button_text_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'action_box_button_text_color',
            array(
                'label'         => esc_html__('Action Box Button Text Color', 'zev'),
                'section'       => 'color_action_box',
                'settings'      => 'action_box_button_text_color',
                'priority'      => 12
            )
        )
    );

    // ADD SECTION COLOR FOOTER
    $wp_customize->add_section('color_footer',array(
        'title'=>'Footer',
        'priority'=>12,
        'panel'=>'color_panel',
    ));

    // Footer background color    
    $wp_customize->add_setting(
        'footer_background_color',
        array(
            'default'           => themesflat_customize_default('footer_background_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'footer_background_color',
            array(
                'label'         => esc_html__('Backgound Color', 'zev'),
                'section'       => 'color_footer',
                'settings'      => 'footer_background_color',
                'priority'      => 12
            )
        )
    );

    // Footer text title color
    $wp_customize->add_setting(
        'footer_title_widget_color',
        array(
            'default'           => themesflat_customize_default('footer_title_widget_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'footer_title_widget_color',
            array(
                'label'         => esc_html__('Title Widget Color', 'zev'),
                'section'       => 'color_footer',
                'settings'      => 'footer_title_widget_color',
                'priority'      => 13
            )
        )
    ); 

    // Footer text color
    $wp_customize->add_setting(
        'footer_text_color',
        array(
            'default'           => themesflat_customize_default('footer_text_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'footer_text_color',
            array(
                'label'         => esc_html__('Color', 'zev'),
                'section'       => 'color_footer',
                'settings'      => 'footer_text_color',
                'priority'      => 14
            )
        )
    ); 

    // Footer text color Hover
    $wp_customize->add_setting(
        'footer_text_color_hover',
        array(
            'default'           => themesflat_customize_default('footer_text_color_hover'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'footer_text_color_hover',
            array(
                'label'         => esc_html__('Color Hover', 'zev'),
                'section'       => 'color_footer',
                'settings'      => 'footer_text_color_hover',
                'priority'      => 15
            )
        )
    );
    
    // ADD SECTION COLOR BOTTOM
    $wp_customize->add_section('color_bottom',array(
        'title'=>'Bottom',
        'priority'=>16,
        'panel'=>'color_panel',
    ));

    // Bottom background color    
    $wp_customize->add_setting(
        'bottom_background_color',
        array(
            'default'           => themesflat_customize_default('bottom_background_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        new themesflat_ColorOverlay(
            $wp_customize,
            'bottom_background_color',
            array(
                'label'         => esc_html__('Backgound Color', 'zev'),
                'section'       => 'color_bottom',
                'settings'      => 'bottom_background_color',
                'priority'      => 17
            )
        )
    );

    // Bottom text color
    $wp_customize->add_setting(
        'bottom_text_color',
        array(
            'default'           => themesflat_customize_default('bottom_text_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'bottom_text_color',
            array(
                'label'         => esc_html__('Color', 'zev'),
                'section'       => 'color_bottom',
                'settings'      => 'bottom_text_color',
                'priority'      => 18
            )
        )
    );

    // Bottom link color
    $wp_customize->add_setting(
        'bottom_link_color',
        array(
            'default'           => themesflat_customize_default('bottom_link_color'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'bottom_link_color',
            array(
                'label'         => esc_html__('Link Color', 'zev'),
                'section'       => 'color_bottom',
                'settings'      => 'bottom_link_color',
                'priority'      => 19
            )
        )
    );

    // Bottom Text Color Hover
    $wp_customize->add_setting(
        'bottom_text_color_hover',
        array(
            'default'           => themesflat_customize_default('bottom_text_color_hover'),
            'sanitize_callback' => 'sanitize_hex_color',
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'bottom_text_color_hover',
            array(
                'label'         => esc_html__('Color Hover', 'zev'),
                'section'       => 'color_bottom',
                'settings'      => 'bottom_text_color_hover',
                'priority'      => 19
            )
        )
    );
   
    // Section Blog
    $wp_customize->add_section(
        'blog_options',
        array(
            'title' => esc_html__('Blog Posts', 'zev'),
            'priority' => 13,
        )
    );

    // Heading Blog
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'bloglist', array(
        'label' => esc_html__('Blog', 'zev'),
        'section' => 'blog_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );    

    // Desc blog
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_bloglist', array(
        'label' => esc_html__('All options in this section will be used to make style for blog page.','zev'),
        'section' => 'blog_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 2
        ) )
    );

    $wp_customize->add_setting(
        'blog_layout',
        array(
            'default'           => themesflat_customize_default('blog_layout'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'blog_layout',
        array (
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 3,
            'label'         => esc_html__('Sidebar Position', 'zev'),
            'choices'   => array (
                'sidebar-right'     => esc_html__( 'Sidebar Right','zev' ),
                'sidebar-left'      =>  esc_html__( 'Sidebar Left','zev' ),
                'fullwidth'         =>   esc_html__( 'Full Width','zev' ),
                'fullwidth-small'   =>   esc_html__( 'Full Width Small','zev' ),
                'fullwidth-center'  =>   esc_html__( 'Full Width Center','zev' ),
                ) ,
        )
    );

    $wp_customize->add_setting(
        'blog_archive_layout',
        array(
            'default'           => themesflat_customize_default('blog_archive_layout'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'blog_archive_layout',
        array (
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 3,
            'label'         => esc_html__('Blog Layout', 'zev'),
            'choices'   => array (
                'blog-list' =>  esc_html__( 'Blog List','zev' ),                  
                'blog-grid'=> esc_html__( 'Blog Grid','zev' ),
                )  
        )
    );

    // Gird columns Posts
    $wp_customize->add_setting(
        'blog_grid_columns',
        array(
            'default'           => themesflat_customize_default('blog_grid_columns'),
            'sanitize_callback' => 'themesflat_sanitize_grid_post_related',
        )
    );
    $wp_customize->add_control(
        'blog_grid_columns',
        array(
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 4,
            'label'     => esc_html__('Post Grid Columns', 'zev'),
            'choices'   => array(
                2     => esc_html__( '2 Columns', 'zev' ),
                3     => esc_html__( '3 Columns', 'zev' ),
                4     => esc_html__( '4 Columns', 'zev' ),                
            )
        )
    );

    $wp_customize->add_setting (
        'blog_sidebar_list',
        array(
            'default'           => themesflat_customize_default('blog_sidebar_list'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_DropdownSidebars($wp_customize,
        'blog_sidebar_list',
        array(
            'type'      => 'dropdown',           
            'section'   => 'blog_options',
            'priority'  => 3,
            'label'         => esc_html__('List Sidebar Position', 'zev'),
            
        ))
    );

    // Excerpt
    $wp_customize->add_setting(
        'blog_archive_post_excepts_length',
        array(
            'default'   =>  themesflat_customize_default('blog_archive_post_excepts_length'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_Slide_Control( $wp_customize,
        'blog_archive_post_excepts_length',
            array(
                'type'      =>  'slide-control',
                'section'   =>  'blog_options',
                'label'     =>  'Post Excepts Length',
                'priority'  => 4,
                'input_attrs' => array(
                    'min' => 0,
                    'max' => 500,
                    'step' => 1,
                ),
            )

        )
    );  

    // Show Content Posts
    $wp_customize->add_setting (
        'show_content',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('show_content'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_content',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Content Posts', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 6,
        ))
    );

    // Show Read More
    $wp_customize->add_setting (
        'blog_archive_readmore',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('blog_archive_readmore'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'blog_archive_readmore',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Read More', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 6,
        ))
    );    

    // Read More Text
    $wp_customize->add_setting (
        'blog_archive_readmore_text',
        array(
            'default' => themesflat_customize_default('blog_archive_readmore_text'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'blog_archive_readmore_text',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Read More Text', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 7
        )
    );

    // Pagination
    $wp_customize->add_setting(
        'blog_archive_pagination_style',
        array(
            'default'           => themesflat_customize_default('blog_archive_pagination_style'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'blog_archive_pagination_style',
        array(
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 8,
            'label'         => esc_html__('Pagination Style', 'zev'),
            'choices'   => array(
                'pager'     => esc_html__('Pager','zev'),
                'numeric'         =>  esc_html__('Numeric','zev'),
                'pager-numeric'         =>  esc_html__('Pager & Numeric','zev'),
                'loadmore' =>  esc_html__( 'Load More', 'zev' )
            ),
        )
    );

    // Header Blog Single    
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'blogsingle', array(
        'label' => esc_html__('Blog Single', 'zev'),
        'section' => 'blog_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 9
        ) )
    );    

    // Desc Blog Single
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_blogsingle', array(
        'label' => esc_html__('Also, you can change the style for blog single to make your site unique.','zev'),
        'section' => 'blog_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    ); 

    // Blog Featured Title
    $wp_customize->add_setting (
        'blog_featured_title',
        array(
            'default' => themesflat_customize_default('blog_featured_title'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'blog_featured_title',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Blog Featured Title', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 11
        )
    );   

    // Show Post Navigator
    $wp_customize->add_setting (
        'show_post_navigator',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('show_post_navigator'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_post_navigator',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Post Navigator', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 12
        ))
    );

    // Enable Entry Footer Content
    $wp_customize->add_setting(
      'show_entry_footer_content',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('show_entry_footer_content'),     
        )   
    );

    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_entry_footer_content',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Show Entry Footer Content', 'zev'),
            'section' => 'blog_options',
            'priority' => 14,
        ))
    );

    // Show Related Posts
    $wp_customize->add_setting (
        'show_related_post',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => 0,     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_related_post',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Related Posts', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 16
        ))
    );

    //Related Posts Style
    $wp_customize->add_setting(
        'related_post_style',
        array(
            'default'           => themesflat_customize_default('related_post_style'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'related_post_style',
        array(
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 16,
            'label'         => esc_html__('Related Posts Style', 'zev'),
            'choices'   => array(
                'blog-list' => esc_html__( 'Blog List','zev' ),
                'blog-grid'=>   esc_html__( 'Blog Grid','zev' ),
        ))
    );

    // Gird columns Related Posts
    $wp_customize->add_setting(
        'grid_columns_post_related',
        array(
            'default'           => 2,
            'sanitize_callback' => 'themesflat_sanitize_grid_post_related',
        )
    );
    $wp_customize->add_control(
        'grid_columns_post_related',
        array(
            'type'      => 'select',           
            'section'   => 'blog_options',
            'priority'  => 17,
            'label'     => esc_html__('Columns Of Related Posts', 'zev'),
            'choices'   => array(                
                2     => esc_html__( '2 Columns', 'zev' ),
                3     => esc_html__( '3 Columns', 'zev' ),
                4     => esc_html__( '4 Columns', 'zev' ),                
            )
        )
    );

    // Number Of Related Posts
    $wp_customize->add_setting (
        'number_related_post',
        array(
            'default' => esc_html__('2', 'zev'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'number_related_post',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Number Of Related Posts', 'zev'),
            'section'   => 'blog_options',
            'priority'  => 18
        )
    );

    // Section portfolio
    $wp_customize->add_section(
        'portfolio_options',
        array(
            'title' => esc_html__('Portfolio', 'zev'),
            'priority' => 14,
        )
    );
    // Header Portfolio Archive    
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'portfolio', array(
        'label' => esc_html__('PORTFOLIO ARCHIVE', 'zev'),
        'section' => 'portfolio_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );    

    // Gird columns portfolio
    $wp_customize->add_setting(
        'portfolio_grid_columns',
        array(
            'default'           => themesflat_customize_default('portfolio_grid_columns'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'portfolio_grid_columns',
        array(
            'type'      => 'select',           
            'section'   => 'portfolio_options',
            'priority'  => 1,
            'label'     => esc_html('Grid Columns', 'zev'),
            'choices'   => array(
                2     => esc_html( '2 Columns', 'zev' ),
                3     => esc_html( '3 Columns', 'zev' ),
                4     => esc_html( '4 Columns', 'zev' )
            )
        )
    );

    // Show Numner Post Portfolios
    $wp_customize->add_setting (
        'portfolios_show_number_post',
        array(
            'default' => themesflat_customize_default('portfolios_show_number_post'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'portfolios_show_number_post',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Show Number Posts Portfolios', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 2
        )
    ); 

    // Order By portfolio
    $wp_customize->add_setting(
        'portfolio_order_by',
        array(
            'default' => themesflat_customize_default('portfolio_order_by'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'portfolio_order_by',
        array(
            'type'      => 'select',
            'label'     => esc_html('Order By', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 3,
            'choices' => array(
                'date'          => esc_html( 'Date', 'zev' ),
                'id'            => esc_html( 'Id', 'zev' ),
                'author'        => esc_html( 'Author', 'zev' ),
                'title'         => esc_html( 'Title', 'zev' ),
                'modified'      => esc_html( 'Modified', 'zev' ),
                'comment_count' => esc_html( 'Comment Count', 'zev' ),
                'menu_order'    => esc_html( 'Menu Order', 'zev' )
            )        
        )
    );

    // Order Direction portfolio
    $wp_customize->add_setting(
        'portfolio_order_direction',
        array(
            'default' => themesflat_customize_default('portfolio_order_direction'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'portfolio_order_direction',
        array(
            'type'      => 'select',
            'label'     => esc_html('Order Direction', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 4,
            'choices' => array(
                'DESC' => esc_html( 'Descending', 'zev' ),
                'ASC'  => esc_html( 'Assending', 'zev' )
            )        
        )
    );

    // Portfolio Exclude Post
    $wp_customize->add_setting (
        'portfolio_exclude',
        array(
            'default' =>  themesflat_customize_default('portfolio_exclude'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'portfolio_exclude',
        array(
            'type'      => 'text',
            'label'     => esc_html('Post Ids Will Be Inorged. Ex: 1,2,3', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 5
        )
    );

    // Show filter portfolio
    $wp_customize->add_setting (
        'portfolio_show_filter',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('portfolio_show_filter'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'portfolio_show_filter',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show filter', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 6
        ))
    );

    // Filter Categories Order
    $wp_customize->add_setting (
        'portfolio_filter_category_order',
        array(
            'default' =>  themesflat_customize_default('portfolio_filter_category_order'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'portfolio_filter_category_order',
        array(
            'type'      => 'text',
            'label'     => esc_html('Filter Slug Categories Order Split By ","', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 7
        )
    );    

    // Header Portfolio Single    
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'portfoliosingle', array(
        'label' => esc_html__('PORTFOLIO SINGLE', 'zev'),
        'section' => 'portfolio_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    );

    // Show Post Navigator portfolio
    $wp_customize->add_setting (
        'portfolios_show_post_navigator',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('portfolios_show_post_navigator'),    
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'portfolios_show_post_navigator',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Single Navigator', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 12
        ))
    );

    // Show Related Portfolios
    $wp_customize->add_setting (
        'portfolios_show_related',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('portfolios_show_related'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'portfolios_show_related',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Related Portfolios', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 13
        ))
    );  

    // Gird columns portfolio related
    $wp_customize->add_setting(
        'portfolios_related_grid_columns',
        array(
            'default'           => themesflat_customize_default('portfolios_related_grid_columns'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'portfolios_related_grid_columns',
        array(
            'type'      => 'select',           
            'section'   => 'portfolio_options',
            'priority'  => 16,
            'label'     => esc_html__('Columns Related', 'zev'),
            'choices'   => array(
                2     => esc_html__( '2 Columns', 'zev' ),
                3     => esc_html__( '3 Columns', 'zev' ),
                4     => esc_html__( '4 Columns', 'zev' )
            )
        )
    );

    // Number Of Related Posts Portfolios
    $wp_customize->add_setting (
        'number_related_post_portfolios',
        array(
            'default' => themesflat_customize_default('number_related_post_portfolios'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'number_related_post_portfolios',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Number Of Related Posts', 'zev'),
            'section'   => 'portfolio_options',
            'priority'  => 17
        )
    );

    // Section Services
    $wp_customize->add_section(
        'services_options',
        array(
            'title' => esc_html__('Services', 'zev'),
            'priority' => 14,
        )
    ); 

    // Header Services Archive    
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'services', array(
        'label' => esc_html__('SERVICES ARCHIVE', 'zev'),
        'section' => 'services_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );    

    // Gird columns portfolio
    $wp_customize->add_setting(
        'services_grid_columns',
        array(
            'default'           => themesflat_customize_default('services_grid_columns'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'services_grid_columns',
        array(
            'type'      => 'select',           
            'section'   => 'services_options',
            'priority'  => 1,
            'label'     => esc_html('Grid Columns', 'zev'),
            'choices'   => array(
                2     => esc_html( '2 Columns', 'zev' ),
                3     => esc_html( '3 Columns', 'zev' ),
                4     => esc_html( '4 Columns', 'zev' )
            )
        )
    );

    // Show Numner Post Services
    $wp_customize->add_setting (
        'services_show_number_post',
        array(
            'default' => themesflat_customize_default('services_show_number_post'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'services_show_number_post',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Show Number Posts Services', 'zev'),
            'section'   => 'services_options',
            'priority'  => 2
        )
    );

    // Number Of Related Posts Service
    $wp_customize->add_setting (
        'number_related_post_services',
        array(
            'default' => esc_html__('3', 'zev'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'number_related_post_services',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Number Of Related Posts', 'zev'),
            'section'   => 'services_options',
            'priority'  => 17
        )
    );

    // Order By services
    $wp_customize->add_setting(
        'services_order_by',
        array(
            'default' => themesflat_customize_default('services_order_by'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'services_order_by',
        array(
            'type'      => 'select',
            'label'     => esc_html('Order By', 'zev'),
            'section'   => 'services_options',
            'priority'  => 3,
            'choices' => array(
                'date'          => esc_html( 'Date', 'zev' ),
                'id'            => esc_html( 'Id', 'zev' ),
                'author'        => esc_html( 'Author', 'zev' ),
                'title'         => esc_html( 'Title', 'zev' ),
                'modified'      => esc_html( 'Modified', 'zev' ),
                'comment_count' => esc_html( 'Comment Count', 'zev' ),
                'menu_order'    => esc_html( 'Menu Order', 'zev' )
            )        
        )
    );

    // Order Direction services
    $wp_customize->add_setting(
        'services_order_direction',
        array(
            'default' => themesflat_customize_default('services_order_direction'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'services_order_direction',
        array(
            'type'      => 'select',
            'label'     => esc_html('Order Direction', 'zev'),
            'section'   => 'services_options',
            'priority'  => 4,
            'choices' => array(
                'DESC' => esc_html( 'Descending', 'zev' ),
                'ASC'  => esc_html( 'Assending', 'zev' )
            )        
        )
    );

    // services Exclude Post
    $wp_customize->add_setting (
        'services_exclude',
        array(
            'default' =>  themesflat_customize_default('services_exclude'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'services_exclude',
        array(
            'type'      => 'text',
            'label'     => esc_html('Post Ids Will Be Inorged. Ex: 1,2,3', 'zev'),
            'section'   => 'services_options',
            'priority'  => 5
        )
    );

    // Show filter services
    $wp_customize->add_setting (
        'services_show_filter',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('services_show_filter'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'services_show_filter',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show filter', 'zev'),
            'section'   => 'services_options',
            'priority'  => 6
        ))
    );

    // Filter Categories Order
    $wp_customize->add_setting (
        'services_filter_category_order',
        array(
            'default' =>  themesflat_customize_default('services_filter_category_order'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'services_filter_category_order',
        array(
            'type'      => 'text',
            'label'     => esc_html('Filter Slug Categories Order Split By ","', 'zev'),
            'section'   => 'services_options',
            'priority'  => 7
        )
    ); 

    // Header Services Single    
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'servicessingle', array(
        'label' => esc_html__('SERVICES SINGLE', 'zev'),
        'section' => 'services_options',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    ); 

    // Show Post Navigator services
    $wp_customize->add_setting (
        'services_show_post_navigator',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('services_show_post_navigator'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'services_show_post_navigator',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Single Navigator', 'zev'),
            'section'   => 'services_options',
            'priority'  => 11
        ))
    );  

    // Show Related services
    $wp_customize->add_setting (
        'services_show_related',
        array (
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('services_show_related'),     
        )
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'services_show_related',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Show Related Services', 'zev'),
            'section'   => 'services_options',
            'priority'  => 12
        ))
    );

    // Gird columns services related
    $wp_customize->add_setting(
        'services_related_grid_columns',
        array(
            'default'           => themesflat_customize_default('services_related_grid_columns'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        'services_related_grid_columns',
        array(
            'type'      => 'select',           
            'section'   => 'services_options',
            'priority'  => 13,
            'label'     => esc_html__('Columns Related', 'zev'),
            'choices'   => array(
                2     => esc_html__( '2 Columns', 'zev' ),
                3     => esc_html__( '3 Columns', 'zev' ),
                4     => esc_html__( '4 Columns', 'zev' )
            )
        )
    ); 
    
    // Section Typography
    $wp_customize->add_section(
        'flat_typography',
        array(
            'title' => esc_html__('Typography', 'zev'),
            'priority' => 14,            
        )
    );
    // Heading Typography
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-typography', array(
        'label' => esc_html__('BODY FONT', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 2
        ) )
    );    

    // Desc Typography
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_logo', array(
        'label' => esc_html__('You can modify the font family, size, color, ... for global content.', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 3
        ) )
    );
  
    //__Page title and breadcrumb__//
    $wp_customize->add_panel('page_title_panel',array(
        'title'         => esc_html__('Page Title & Breadcrumb','zev'),
        'description'   => 'This is panel Description',
        'priority'      => 10,
    ));

    // ADD SECTION PAGE TITLE
    $wp_customize->add_section('page_title_style',array(
        'title'         => esc_html__('Page Title Style','zev'),
        'priority'      => 10,
        'panel'         => 'page_title_panel',
    ));

   // Heading Page Title
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'page_title_style', array(
        'label' => esc_html__('Page Title Style', 'zev'),
        'section' => 'page_title_style',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    ); 

    $wp_customize->add_setting(
        'page_title_styles',
        array(
            'default'           => themesflat_customize_default('page_title_styles'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'page_title_styles',
        array (
            'type'      => 'select',           
            'section'   => 'page_title_style',
            'priority'  => 3,
            'label'         => esc_html__('Page Title Style', 'zev'),
            'choices'   => array (
                'inline' =>  esc_html__( 'Inline Heading & Breadcrumbs','zev' ),
                'default' =>  esc_html__( 'Default','zev' ),
                'parallax' =>  esc_html__( 'Parallax','zev' ),
                'video' =>  esc_html__( 'Video','zev' )
                ) ,
        )
    );

    $wp_customize->add_setting(
        'page_title_alignment',
        array(
            'default'           => themesflat_customize_default('page_title_alignment'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'page_title_alignment',
        array (
            'type'      => 'select',           
            'section'   => 'page_title_style',
            'priority'  => 4,
            'label'         => esc_html__('Page Title Alignment', 'zev'),
            'choices'   => array (
                'left' =>  esc_html__( 'Left','zev' ),
                'center' =>  esc_html__( 'Center','zev' ),
                'right' =>  esc_html__( 'Right','zev' )
                ) ,
        )
    ); 

    //Page Title Background
    $wp_customize->add_setting(
        'page_title_background_image',
        array(
            'default' => themesflat_customize_default('page_title_background_image'),
            'sanitize_callback' => 'esc_url_raw',
        )
    );    
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'page_title_background_image',
            array(
               'label'          => esc_html__( 'Upload Your Page Title Background Image', 'zev' ),
               'type'           => 'image',
               'section'        => 'page_title_style',
               'priority'       => 5,
            )
        )
    );

    $wp_customize->add_setting(
        'page_title_image_size',
        array(
            'default'           => themesflat_customize_default('page_title_image_size'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'page_title_image_size',
        array (
            'type'      => 'select',           
            'section'   => 'page_title_style',
            'priority'  => 5,
            'label'         => esc_html__('Page Title Image Size', 'zev'),
            'choices'   => array (
                'auto' =>  esc_html__( 'Original','zev' ),
                'contain' =>  esc_html__( 'Fit to Screen','zev' ),
                'cover' =>  esc_html__( 'Fill Screen','zev' )
                ) ,
        )
    );

    $wp_customize->add_setting (
        'page_title_video_url',
        array(
            'default' => themesflat_customize_default('page_title_video_url') ,
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'page_title_video_url',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Page Title Background Video URL', 'zev'),
            'section'   => 'page_title_style',
            'priority'  => 6
        )
    );

    // Page Title Color
    $wp_customize->add_setting(
        'page_title_text_color',
        array(
            'default'           => themesflat_customize_default('page_title_text_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'page_title_text_color',
            array(
                'label'         => esc_html__('Page Heading Text Color', 'zev'),
                'section'       => 'page_title_style',
                'priority'      => 7
            )
        )
    );

    // Page Title Link Color
    $wp_customize->add_setting(
        'page_title_link_color',
        array(
            'default'           => themesflat_customize_default('page_title_link_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'page_title_link_color',
            array(
                'label'         => esc_html__('Breadcrumb Text Color', 'zev'),
                'section'       => 'page_title_style',
                'priority'      => 8
            )
        )
    );

    // Page Title Overlay
    $wp_customize->add_setting(
        'page_title_background_color_primary',
        array(
            'default'           => themesflat_customize_default('page_title_background_color_primary'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'page_title_background_color_primary',
            array(
                'label'         => esc_html__('Page Title Overlay Background Gradient', 'zev'),
                'description'   => esc_html__('Primary Color', 'zev'),
                'section'       => 'page_title_style',
                'priority'      => 9
            )
        )
    );
    $wp_customize->add_setting(
        'page_title_background_color_second',
        array(
            'default'           => themesflat_customize_default('page_title_background_color_second'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_ColorOverlay(
            $wp_customize,
            'page_title_background_color_second',
            array(
                'description'   => esc_html__('Second Color', 'zev'),
                'section'       => 'page_title_style',
                'priority'      => 9
            )
        )
    );    

    $wp_customize->add_setting(
        'page_title_background_color_opacity',
        array(
            'default'   =>  themesflat_customize_default('page_title_background_color_opacity'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( new themesflat_Slide_Control( $wp_customize,
        'page_title_background_color_opacity',
            array(
                'type'      =>  'slide-control',
                'section'   =>  'page_title_style',
                'label'     =>  'Opacity for Background Color (%)',
                'priority'  => 9,
                'input_attrs' => array(
                    'min' => 0,
                    'max' => 100,
                    'step' => 1,
                ),
            )

        )
    );  

    // Box control
    $wp_customize->add_setting(
        'page_title_controls',
        array(
            'default' => themesflat_customize_default('page_title_controls'),
            'sanitize_callback' => 'themesflat_sanitize_text',
        )
    );
    $wp_customize->add_control( new themesflat_BoxControls($wp_customize,
        'page_title_controls',
        array(
            'label' => esc_html__( 'Page Title Controls (px)', 'zev' ),
            'section' => 'page_title_style',
            'type' => 'box-controls',
            'priority' => 10
        ))
    ); 

    // Page title heading
    $wp_customize->add_setting(
      'page_title_heading_enabled',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('page_title_heading_enabled'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'page_title_heading_enabled',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Enable Heading Page Title', 'zev'),
            'section' => 'page_title_style',
            'priority' => 10,
        ))
    ); 

    // Heading Button On Page Title
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'page_title_button', array(
        'label' => esc_html__('Button On Page Title', 'zev'),
        'description'   => esc_html__(' Opacity =1 for Background Color', 'zev'),
        'section' => 'page_title_style',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    );  

    // Desc Button On Page Title
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_page_title_button', array(
        'label' => esc_html__('Only show when page title style default and page title align left', 'zev'),
        'section' => 'page_title_style',
        'settings' => 'themesflat_options[info]',
        'priority' => 10
        ) )
    ); 

    // Enable Header Absolute
    $wp_customize->add_setting(
      'page_title_button_show',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('page_title_button_show'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'page_title_button_show',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Button Show', 'zev'),
            'section' => 'page_title_style',
            'priority' => 10,
        ))
    );

    $wp_customize->add_setting(
        'text_page_title_button',
        array(
            'default'   =>  themesflat_customize_default('text_page_title_button'),
            'sanitize_callback'  =>  'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'text_page_title_button',
        array(
            'type'      =>  'text',
            'section'   =>  'page_title_style',
            'label'     =>  'Text Button',
            'priority'  => 10
        )
    );

    $wp_customize->add_setting (
        'page_title_button_url',
        array(
            'default' => themesflat_customize_default('page_title_button_url') ,
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'page_title_button_url',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Button Link', 'zev'),
            'section'   => 'page_title_style',
            'priority'  => 10
        )
    );

    // ADD SECTION BREADCRUMB
    $wp_customize->add_section('page_break_crumb_section',array(
        'title'         => esc_html__('Page Breadcrumb','zev'),
        'priority'      => 10,
        'panel'         => 'page_title_panel',
    ));

   // Breadcrumb section
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'page_break_crumb_section', array(
        'label' => esc_html__('Page Breadcrumb', 'zev'),
        'section' => 'page_break_crumb_section',
        'settings' => 'themesflat_options[info]',
        'priority' => 1
        ) )
    );  

    // Breadcrumb
    $wp_customize->add_setting(
      'breadcrumb_enabled',
        array(
            'sanitize_callback' => 'themesflat_sanitize_checkbox',
            'default' => themesflat_customize_default('breadcrumb_enabled'),     
        )   
    );
    $wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'breadcrumb_enabled',
        array(
            'type' => 'checkbox',
            'label' => esc_html__('Enable Breadcrumb', 'zev'),
            'section' => 'page_break_crumb_section',
            'priority' => 14,
        ))
    );    

    $wp_customize->add_setting (
        'bread_crumb_prefix',
        array(
            'default' => themesflat_customize_default('bread_crumb_prefix') ,
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'bread_crumb_prefix',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Breadcrumb Prefix', 'zev'),
            'section'   => 'page_break_crumb_section',
            'priority'  => 15
        )
    );  

    $wp_customize->add_setting (
        'breadcrumb_separator',
        array(
            'default' => themesflat_customize_default('breadcrumb_separator'),
            'sanitize_callback' => 'themesflat_sanitize_text'
        )
    );
    $wp_customize->add_control(
        'breadcrumb_separator',
        array(
            'type'      => 'text',
            'label'     => esc_html__('Breadcrumb Separator', 'zev'),
            'section'   => 'page_break_crumb_section',
            'priority'  => 16
        )
    );    

    // Body fonts
    $wp_customize->add_setting(
        'body_font_name',
        array(
            'default' => themesflat_customize_default('body_font_name'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_Typography($wp_customize,
        'body_font_name',
        array(
            'label' => esc_html__( 'Font name/style/sets', 'zev' ),
            'section' => 'flat_typography',
            'type' => 'typography',
            'fields' => array('family','style','line_height','size'),
            'priority' => 4
        ))
    );

    // Headings fonts
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'custom-heading-font', array(
        'label' => esc_html__('Headings fonts', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 8
        ) )
    );    

    // Desc font
    $wp_customize->add_control( new themesflat_Desc_Info( $wp_customize, 'desc_customizer_heading-font', array(
        'label' => esc_html__('You can modify the font options for your headings. h1, h2, h3, h4, ...', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 9
        ) )
    );   

    $wp_customize->add_setting(
        'headings_font_name',
        array(
            'default' => themesflat_customize_default('headings_font_name'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_Typography($wp_customize,
        'headings_font_name',
        array(
            'label' => esc_html__( 'Font name/style/sets', 'zev' ),
            'section' => 'flat_typography',
            'type' => 'typography',
            'fields' => array('family','style','line_height'),
            'priority' => 11
        ))
    );

    // H1 size
    $wp_customize->add_setting(
        'h1_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           => themesflat_customize_default('h1_size'),
        )       
    );
    $wp_customize->add_control( 'h1_size', array(
        'type'        => 'number',
        'priority'    => 13,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H1 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // H2 size
    $wp_customize->add_setting(
        'h2_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           =>  themesflat_customize_default('h2_size'),
        )       
    );
    $wp_customize->add_control( 'h2_size', array(
        'type'        => 'number',
        'priority'    => 14,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H2 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // H3 size
    $wp_customize->add_setting(
        'h3_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           => themesflat_customize_default('h3_size'),
        )       
    );
    $wp_customize->add_control( 'h3_size', array(
        'type'        => 'number',
        'priority'    => 15,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H3 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // H4 size
    $wp_customize->add_setting(
        'h4_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           =>  themesflat_customize_default('h4_size'),
        )       
    );
    $wp_customize->add_control( 'h4_size', array(
        'type'        => 'number',
        'priority'    => 16,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H4 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // H5 size
    $wp_customize->add_setting(
        'h5_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           =>  themesflat_customize_default('h5_size'),
        )       
    );
    $wp_customize->add_control( 'h5_size', array(
        'type'        => 'number',
        'priority'    => 17,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H5 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // H6 size
    $wp_customize->add_setting(
        'h6_size',
        array(
            'sanitize_callback' => 'absint',
            'default'           =>  themesflat_customize_default('h6_size'),
        )       
    );
    $wp_customize->add_control( 'h6_size', array(
        'type'        => 'number',
        'priority'    => 18,
        'section'     => 'flat_typography',
        'label'       => esc_html__('H6 font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // Menu fonts
    $wp_customize->add_setting('themesflat_options[info]', array(
            'type'              => 'info_control',
            'capability'        => 'edit_theme_options',
            'sanitize_callback' => 'esc_attr',            
        )
    );
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'menu_fonts', array(
        'label' => esc_html__('Menu fonts', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 19
        ) )
    );

    $wp_customize->add_setting(
        'menu_font_name',
        array(
            'default' => themesflat_customize_default('menu_font_name'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_Typography($wp_customize,
        'menu_font_name',
        array(
            'label' => esc_html__( 'Font name/style/sets', 'zev' ),
            'section' => 'flat_typography',
            'type' => 'typography',
            'fields' => array('family','style','line_height','size'),
            'priority' => 20
        ))
    );

    // Sub Menu fonts
    $wp_customize->add_setting('themesflat_options[info]', array(
            'type'              => 'info_control',
            'capability'        => 'edit_theme_options',
            'sanitize_callback' => 'esc_attr',            
        )
    );
    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'sub_menu_fonts', array(
        'label' => esc_html__('Sub Menu fonts', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 21
        ) )
    );

    $wp_customize->add_setting(
        'sub_menu_font_name',
        array(
            'default' => themesflat_customize_default('sub_menu_font_name'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_Typography($wp_customize,
        'sub_menu_font_name',
        array(
            'label' => esc_html__( 'Font name/style/sets', 'zev' ),
            'section' => 'flat_typography',
            'type' => 'typography',
            'fields' => array('family','style','line_height','size'),
            'priority' => 22
        ))
    );

    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'blockquote-fonts', array(
        'label' => esc_html__('Blockquote fonts', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 23
        ) )
    );
    $wp_customize->add_setting(
        'blockquote_font_name',
        array(
            'default' => themesflat_customize_default('blockquote_font_name'),
            'sanitize_callback' => 'esc_html',
        )
    );
    $wp_customize->add_control( new themesflat_Typography($wp_customize,
        'blockquote_font_name',
        array(
            'label' => esc_html__( 'Font name/style/sets', 'zev' ),
            'section' => 'flat_typography',
            'type' => 'typography',
            'fields' => array('family','style','line_height','size'),
            'priority' => 24
        ))
    );

    $wp_customize->add_control( new themesflat_Info( $wp_customize, 'other-fonts', array(
        'label' => esc_html__('Other fonts', 'zev'),
        'section' => 'flat_typography',
        'settings' => 'themesflat_options[info]',
        'priority' => 25
        ) )
    );

    // Widget title size
    $wp_customize->add_setting(
        'title_widget_font',
        array(
            'sanitize_callback' => 'absint',
            'default'           => themesflat_customize_default('title_widget_font'),
        )       
    );
    $wp_customize->add_control( 'title_widget_font', array(
        'type'        => 'number',
        'priority'    => 26,
        'section'     => 'flat_typography',
        'label'       => esc_html__('Widget title font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );

    // Title Comment
    $wp_customize->add_setting(
        'title_comment_font',
        array(
            'sanitize_callback' => 'absint',
            'default'           => themesflat_customize_default('title_comment_font'),
        )       
    );
    $wp_customize->add_control( 'title_comment_font', array(
        'type'        => 'number',
        'priority'    => 27,
        'section'     => 'flat_typography',
        'label'       => esc_html__('Comment title font size (px)', 'zev'),
        'input_attrs' => array(
            'min'   => 10,
            'max'   => 60,
            'step'  => 1,
            'style' => 'margin-bottom: 15px; padding: 10px;',
        ),
    ) );    

    $wp_customize->add_setting(
        'layout_version',
        array(
            'default'           => themesflat_customize_default('layout_version'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control( 
        'layout_version',
        array(
            'type'      => 'select',           
            'section'   => 'colors',
            'priority'  => 7,
            'label'         => esc_html__('Layout version', 'zev'),
            'choices'   => array(
                'wide'           =>  esc_html__('Wide','zev'),
                'boxed'         =>   esc_html__('Boxed','zev'),
        ))
    );

    // body background color
    $wp_customize->add_setting(
        'body_background_color',
        array(
            'default'           => themesflat_customize_default('body_background_color'),
            'sanitize_callback' => 'esc_attr',
        )
    );
    $wp_customize->add_control(
        new themesflat_ColorOverlay(
            $wp_customize,
            'body_background_color',
            array(
                'label'         => esc_html__('Body Background Color', 'zev'),
                'description'   => esc_html__(' Opacity =1 for Background Color', 'zev'),
                'section'       => 'colors',
                'priority'      => 8
            )
        )
    );    

}
add_action( 'customize_register', 'themesflat_customize_register' );

// Text
function themesflat_sanitize_text( $input ) {
    return wp_kses( $input, themesflat_kses_allowed_html() );
}

// Background size
function themesflat_sanitize_bg_size( $input ) {
    $valid = array(
        'cover'     => esc_html__('Cover', 'zev'),
        'contain'   => esc_html__('Contain', 'zev'),
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Blog Layout
function themesflat_sanitize_blog( $input ) {
    $valid = array(
        'sidebar-right'    => esc_html__( 'Sidebar right', 'zev' ),
        'sidebar-left'    => esc_html__( 'Sidebar left', 'zev' ),
        'fullwidth'  => esc_html__( 'Full width (no sidebar)', 'zev' )

    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// themesflat_sanitize_pagination
function themesflat_sanitize_pagination ( $input ) {
    $valid = array(
        'pager' => esc_html__('Pager', 'zev'),
        'numeric' => esc_html__('Numeric', 'zev'),
        'page_numeric' => esc_html__('Pager & Numeric', 'zev')                
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// themesflat_sanitize_pagination
function themesflat_sanitize_layout_version ( $input ) {
    $valid = array(
        'boxed' => esc_html__('Boxed', 'zev'),
        'wide' => esc_html__('Wide', 'zev')          
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// themesflat_sanitize_related_post
function themesflat_sanitize_related_post ( $input ) {
    $valid = array(
        'simple_list' => esc_html__('Simple List', 'zev'),
        'grid' => esc_html__('Grid', 'zev')        
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Footer widget areas
function themesflat_sanitize_fw( $input ) {
    $valid = array(
        '0' => esc_html__('footer_default', 'zev'),
        '1' => esc_html__('One', 'zev'),
        '2' => esc_html__('Two', 'zev'),
        '3' => esc_html__('Three', 'zev'),
        '4' => esc_html__('Four', 'zev')
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Header style sanitize
function themesflat_sanitize_headerstyle( $input ) {
    $valid = themesflat_predefined_header_styles();
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Checkboxes
function themesflat_sanitize_checkbox( $input ) {
    if ( $input == 1 ) {
        return 1;
    } else {
        return '';
    }
}

// Themesflat_sanitize_related_portfolio
function themesflat_sanitize_related_portfolio( $input ) {
    $valid = array(
        'grid'                 => esc_html__( 'Grid', 'zev' ),
        'grid_masonry'         => esc_html__( 'Grid Masonry', 'zev' ),
        'grid_nomargin'        => esc_html__( 'Grid Masonry No Margin', 'zev' ),
        'carosuel'             => esc_html__( 'Carosuel', 'zev' ),
        'carosuel_nomargin'    => esc_html__( 'Carosuel No Margin', 'zev' )       
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Themesflat_sanitize_portfolio_pagination
function themesflat_sanitize_portfolio_pagination( $input ) {
    $valid = array(
        'page_numeric'         => esc_html__( 'Pager & Numeric', 'zev' ),
        'load_more'         => esc_html__( 'Load More', 'zev' )     
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Themesflat_sanitize_portfolio_order
function themesflat_sanitize_portfolio_order( $input ) {
    $valid = array(
        'date'          => esc_html__( 'Date', 'zev' ),
        'id'            => esc_html__( 'Id', 'zev' ),
        'author'        => esc_html__( 'Author', 'zev' ),
        'title'         => esc_html__( 'Title', 'zev' ),
        'modified'      => esc_html__( 'Modified', 'zev' ),
        'comment_count' => esc_html__( 'Comment Count', 'zev' ),
        'menu_order'    => esc_html__( 'Menu Order', 'zev' )     
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Themesflat_sanitize_portfolio_order_direction
function themesflat_sanitize_portfolio_order_direction( $input ) {
    $valid = array(
        'DESC' => esc_html__( 'Descending', 'zev' ),
        'ASC'  => esc_html__( 'Assending', 'zev' )       
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Themesflat_sanitize_grid_portfolio
function themesflat_sanitize_grid_portfolio( $input ) {
    $valid = array(
        'portfolio-two-columns'     => esc_html__( '2 Columns', 'zev' ),
        'portfolio-three-columns'     => esc_html__( '3 Columns', 'zev' ),
        'portfolio-four-columns'     => esc_html__( '4 Columns', 'zev' ),
        'portfolio-five-columns'     => esc_html__( '5 Columns', 'zev' )
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// themesflat_sanitize_grid_portfolio_related
function themesflat_sanitize_grid_portfolio_related( $input ) {
    $valid = array(
        'portfolio-one-columns'     => esc_html__( '1 Columns', 'zev' ),
        'portfolio-two-columns'     => esc_html__( '2 Columns', 'zev' ),
        'portfolio-three-columns'     => esc_html__( '3 Columns', 'zev' ),
        'portfolio-four-columns'     => esc_html__( '4 Columns', 'zev' ),
        'portfolio-five-columns'     => esc_html__( '5 Columns', 'zev' )
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// Themesflat_sanitize_grid_post_related
function themesflat_sanitize_grid_post_related( $input ) {
    $valid = array(        
        2    => esc_html__( '2 Columns', 'zev' ),
        3    => esc_html__( '3 Columns', 'zev' ),
        4    => esc_html__( '4 Columns', 'zev' ), 
        5    => esc_html__( '5 Columns', 'zev' ),       
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

// themesflat_sanitize_layout_product
function themesflat_sanitize_layout_product( $input ) {
    $valid = array(        
        'fullwidth'         => esc_html__( 'No Sidebar', 'zev' ),
        'sidebar-right'           => esc_html__( 'Sidebar Right', 'zev' ),
        'sidebar-left'         => esc_html__( 'Sidebar Left', 'zev' )
    );
    if ( array_key_exists( $input, $valid ) ) {
        return $input;
    } else {
        return '';
    }
}

