<?php
/**
 * Theme Options.
 *
 * @package blogging_hub
 */

// Add Panel.
$wp_customize->add_panel('home_option_panel',
	array(
	'title'      => __( 'Homepage Options', 'blogging-hub' ),
	'priority'   => 100,
	'capability' => 'edit_theme_options',
	)
);

// Header
$wp_customize->add_section('blogging_hub_header_settings', 
	array(    
	'title'       => __('Header Options', 'blogging-hub'),
	'priority'   => 90,
	'panel'       => 'home_option_panel'
	)
);

// Show/Hide
$wp_customize->add_setting('blogging_hub_header_search_hide', array(
    'default' => false,
    'sanitize_callback' => 'blogging_hub_sanitize_checkbox',
));

$wp_customize->add_control('blogging_hub_header_search_hide', array(
    'label' => __('Enable Header Search', 'blogging-hub'),
    'section' => 'blogging_hub_header_settings',
    'type' => 'checkbox',
));

// Email
$wp_customize->add_setting('blogging_hub_topbar_email', array(
    'default' => '',
    'sanitize_callback' => 'sanitize_email',
));

$wp_customize->add_control('blogging_hub_topbar_email', array(
    'label'   => __('Topbar Email', 'blogging-hub'),
    'section' => 'blogging_hub_header_settings', 
    'type'    => 'text',
));

//Social Icons Urls

$wp_customize->add_setting( 'blogging_hub_facebook_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_facebook_url', array(
	'label'       => __( 'Facebook Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );

$wp_customize->add_setting( 'blogging_hub_twitter_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_twitter_url', array(
	'label'       => __( 'Twitter Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );

$wp_customize->add_setting( 'blogging_hub_instagram_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_instagram_url', array(
	'label'       => __( 'Instagram Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );

$wp_customize->add_setting( 'blogging_hub_youtube_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_youtube_url', array(
	'label'       => __( 'Youtube Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );

$wp_customize->add_setting( 'blogging_hub_linkedin_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_linkedin_url', array(
	'label'       => __( 'Linkedin Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );

$wp_customize->add_setting( 'blogging_hub_pinterest_url', array(
	'default'           => '',
	'type'              => 'theme_mod',
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'esc_url_raw',
	'transport'         => 'refresh',
) );

$wp_customize->add_control( 'blogging_hub_pinterest_url', array(
	'label'       => __( 'Pinterest Link', 'blogging-hub' ),
	'section'     => 'blogging_hub_header_settings',
	'type'        => 'url',
) );