<?php
/*** Footer Social Icon
 *
 * @package Newsxo
 */

$newsxo_default = newsxo_get_default_theme_options();

$wp_customize->add_section( 'footer_social_icon_section' , 
    array(
        'title' => __('Social Icon', 'newsxo'),
        'priority' => 35,
        'panel' => 'footer_option_panel',
    ) 
);
    // section title
    $wp_customize->add_setting('footer_social_icon_title',
        array(
            'sanitize_callback' => 'sanitize_text_field',
        )
    );
    $wp_customize->add_control(
        new Newsxo_Section_Title(
            $wp_customize,
            'footer_social_icon_title',
            array(
                'label' => esc_html__('Social Icon', 'newsxo'),
                'section' => 'footer_social_icon_section',

            )
        )
    );
    //Enable and disable social icon
    $wp_customize->add_setting('footer_social_icon_enable',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'footer_social_icon_enable', 
        array(
            'label' => esc_html__('Hide / Show Social Icon', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    // Soical facebook link
    $wp_customize->add_setting(
        'newsxo_footer_fb_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
        'newsxo_footer_fb_link',
        array(
            'label' => __('Facebook URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_fb_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_fb_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Social Twitter link
    $wp_customize->add_setting(
        'newsxo_footer_twt_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
        'newsxo_footer_twt_link',
        array(
            'label' => __('Twitter URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_twt_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_twt_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Soical Linkedin link
    $wp_customize->add_setting(
        'newsxo_footer_lnkd_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
    'newsxo_footer_lnkd_link',
        array(
            'label' => __('Linkedin URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_lnkd_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_lnkd_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Soical Instagram link
    $wp_customize->add_setting(
        'newsxo_footer_insta_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
        'newsxo_footer_insta_link',
        array(
            'label' => __('Instagram URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_insta_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_insta_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Soical Youtube link
    $wp_customize->add_setting(
        'newsxo_footer_youtube_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
        'newsxo_footer_youtube_link',
        array(
            'label' => __('Youtube URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_youtube_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_youtube_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Soical Pintrest link
    $wp_customize->add_setting(
        'newsxo_footer_pinterest_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
        'newsxo_footer_pinterest_link',
        array(
            'label' => __('Pinterest URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_pinterest_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_pinterest_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));
    //Soical Telegram link
    $wp_customize->add_setting(
    'newsxo_footer_tele_link',
        array(
            'sanitize_callback' => 'esc_url_raw',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(
    'newsxo_footer_tele_link',
        array(
            'label' => __('Telegram URL','newsxo'),
            'section' => 'footer_social_icon_section',
            'type' => 'text',
        )
    );
    $wp_customize->add_setting('newsxo_footer_tele_target',
        array(
            'default' => true,
            'sanitize_callback' => 'newsxo_social_sanitize_checkbox',
            'transport' => 'postMessage',
        )
    );
    $wp_customize->add_control(new Newsxo_Toggle_Control( $wp_customize, 'newsxo_footer_tele_target', 
        array(
            'label' => esc_html__('Open link in a new tab', 'newsxo'),
            'type' => 'toggle',
            'section' => 'footer_social_icon_section',
        )
    ));