<?php
/**
 * Theme Customizer Custom
 *
 * @package Matrimony
 */
	
/*********  Starting Panel Setting *************************/
$wp_customize->add_panel('matrimony_general',
    array(
        'priority' => 14,
        'title' => esc_html__('General Sections ','matrimony'),
    )
);
/**************  Starting Genaral Sections ******************************/
$wp_customize->add_section('matrimony_general_setups',
    array(
        'priority' => 1,
        'title' => esc_html__('General Settings','matrimony'),
        'panel' => 'matrimony_general'
    )
);
$wp_customize->add_setting('matrimony_general_option',
    array(
        'default' => 0,
        'sanitize_callback' => 'matrimonial_sanitize_switch_options'
    )
);

$wp_customize->add_control(new Matrimony_WP_Customize_Switch_Control($wp_customize,'matrimony_general_option',
    array(
        'priority'      =>  1,
        'type' => 'switch',
        'label' => esc_html__('Enable Meta Data Settings', 'matrimony'),
        'section' => 'matrimony_general_setups',
    )
) );
$wp_customize->add_setting('matrimony_404_image',
    array(
        'default' => '',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control( $wp_customize,'matrimony_404_image',
    array(
        'label'      => esc_html__( '404 Background Image ', 'matrimony' ),
        'section'    => 'matrimony_general_setups',
        'settings'   => 'matrimony_404_image',
        'priority' => 3,
    )
) );
$wp_customize->add_setting('matrimony_404_image_two',
    array(
        'default' => '',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control( $wp_customize,'matrimony_404_image_two',
    array(
        'label'      => esc_html__( '404 Image ', 'matrimony' ),
        'section'    => 'matrimony_general_setups',
        'settings'   => 'matrimony_404_image_two',
        'priority' => 3,
    )
) );
$wp_customize->add_setting('matrimony_404_num_one', 
    array(
        'default' => 4,
        'sanitize_callback' => 'matrimony_sanitize_number',
    )
);
$wp_customize->add_control('matrimony_404_num_one',
    array(
        'type' => 'number',
        'label' => esc_html__('404 Number One','matrimony'),
        'section' => 'matrimony_general_setups',
        'setting' => 'matrimony_404_num_one',
        'priority'      =>  9,
        'input_attrs' => array(
            'min' => 1,
            'max' => 9,
        ),
    )
);
$wp_customize->add_setting('matrimony_404_num_two', 
    array(
        'default' => 4,
        'sanitize_callback' => 'matrimony_sanitize_number',
    )
);
$wp_customize->add_control('matrimony_404_num_two',
    array(
        'type' => 'number',
        'label' => esc_html__('404 Number Two','matrimony'),
        'section' => 'matrimony_general_setups',
        'setting' => 'matrimony_404_num_two',
        'priority'      =>  9,
        'input_attrs' => array(
            'min' => 1,
            'max' => 9,
        ),
    )
);
$wp_customize->add_setting('pagination_theme_options', 
    array(
        'default'       => 'default',
        'type'              => 'theme_mod',
        'capability'        => 'edit_theme_options',
        'sanitize_callback' =>  'matrimony_sanitize_select',
    )
);

$wp_customize->add_control('pagination_theme_options', 
    array(    
        'label'   => esc_html__('Pagination Options', 'matrimony'),
        'section'   => 'matrimony_general_setups',
        'settings'  => 'pagination_theme_options',
        'type'    => 'radio',
        'choices'   => array(   
            'default'     => esc_html__('Default', 'matrimony'),             
            'numeric'     => esc_html__('Numeric', 'matrimony'),   
        ),  
    )
);
/*********************  Archive Settings *****************************/
$wp_customize->add_panel('matrimony_archive_section', 
    array(
        'capabitity' => 'edit_theme_options',
        'priority' => 38,
        'title' => esc_html__('Archive Sections', 'matrimony')
    )
);
$wp_customize->add_section('matrimony_archive',
    array(
        'title' => esc_html__('Archive Sidebar Settings', 'matrimony'),
        'panel' => 'matrimony_archive_section'
    )
);
$wp_customize->add_setting('matrimony_archive_setting_sidebar_option',
    array(
        'default' =>  'right-sidebar',
        'sanitize_callback' =>  'matrimony_sanitize_select'
    )
);  

$wp_customize->add_control('matrimony_archive_setting_sidebar_option',
    array(
        'description' => esc_html__('Choose the sidebar Layout for the archive page','matrimony'),
        'section' => 'matrimony_archive',
        'type'    =>  'radio',
        'choices' =>  array(
            'left-sidebar' =>  esc_html__('Sidebar Left','matrimony'),
            'right-sidebar' =>  esc_html__('Sidebar Right','matrimony'),
            'both-sidebar' =>  esc_html__('Sidebar Both','matrimony'),
            'no-sidebar' =>  esc_html__('Sidebar No','matrimony'),
        )
    )
);
$wp_customize->add_setting('matrimony_archive_submit',
    array(
        'default'           =>  esc_html__('Read More ','matrimony'),
        'sanitize_callback' =>  'sanitize_text_field',
    )
);
$wp_customize->add_control('matrimony_archive_submit',
    array(
        'priority'      =>  4,
        'label'         =>  esc_html__('Read More ','matrimony'),
        'section'       =>  'matrimony_archive',
        'setting'       =>  'matrimony_archive_submit',
        'type'          =>  'text',  
    )                                     
);  
