<?php
/**
 * Social Link Options
 *
 * @package Excel_Blog
 */

function excel_blog_customize_register_social( $wp_customize ) {
	
    /** Social Settings */
    $wp_customize->add_section(
        'social_settings',
        array(
            'title'       => __( 'Social Settings', 'excel-blog' ),
            'description' => __( 'Leave blank if you do not want to show the social link.', 'excel-blog' ),
            'priority'    => 30,
            'capability'  => 'edit_theme_options',
        )
    );
    
    /** Enable/Disable Social in Header */
    $wp_customize->add_setting(
        'ed_social',
        array(
            'default'           => '',
            'sanitize_callback' => 'excel_blog_sanitize_checkbox',
        )
    );
    
    $wp_customize->add_control(
        'ed_social',
        array(
            'label'   => __( 'Enable Social Links in Header.', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'checkbox',
        )
    );
    
    /** Facebook */
    $wp_customize->add_setting(
        'facebook',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'facebook',
        array(
            'label'   => __( 'Facebook', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** Twitter */
    $wp_customize->add_setting(
        'twitter',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'twitter',
        array(
            'label'   => __( 'Twitter', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** Pinterest */
    $wp_customize->add_setting(
        'pinterest',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'pinterest',
        array(
            'label'   => __( 'Pinterest', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** Instagram */
    $wp_customize->add_setting(
        'instagram',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'instagram',
        array(
            'label'   => __( 'Instagram', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** LinkedIn */
    $wp_customize->add_setting(
        'linkedin',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'linkedin',
        array(
            'label'   => __( 'LinkedIn', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** Google Plus */
    $wp_customize->add_setting(
        'google_plus',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'google_plus',
        array(
            'label'   => __( 'Google Plus', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    
    /** YouTube */
    $wp_customize->add_setting(
        'youtube',
        array(
            'default'           => '',
            'sanitize_callback' => 'esc_url_raw',
        )
    );
    
    $wp_customize->add_control(
        'youtube',
        array(
            'label'   => __( 'YouTube', 'excel-blog' ),
            'section' => 'social_settings',
            'type'    => 'text',
        )
    );
    /** Social Settings Ends */
}
add_action( 'customize_register', 'excel_blog_customize_register_social' );