<?php
$wp_customize->add_section(
   'header_style_options' ,
    array(
        'title' => __( 'Header Layout', 'truthmag' ),
        'panel' => 'header_options_panel',
    )
);


$wp_customize->add_setting(
    'truthmag_options[select_header_layout_style]',
    array(
        'default'           => $truthmag_default['select_header_layout_style'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'truthmag_sanitize_radio'
    )
);

$wp_customize->add_control(
    new Truthmag_Custom_Radio_Image_Control(
        $wp_customize,
        'truthmag_options[select_header_layout_style]',
        array(
            'label'         => esc_html__( 'Select Header Layout', 'truthmag' ),
            'section'       => 'header_style_options',
            'choices'       => truthmag_get_header_layout(),
        )
    )
);

$wp_customize->add_setting(
    'truthmag_options[enable_header_advertisement]',
    array(
        'default'           => $truthmag_default['enable_header_advertisement'],
        'sanitize_callback' => 'truthmag_sanitize_checkbox',
    )
);
$wp_customize->add_control(
    'truthmag_options[enable_header_advertisement]',
    array(
        'label'    => __( 'Enable Header Advertisement', 'truthmag' ),
        'section'     => 'header_style_options',
        'type'        => 'checkbox',
    )
);


$wp_customize->add_setting(
    'truthmag_options[header_advert_image]',
    array(
        'default' => $truthmag_default['header_advert_image'],
        'sanitize_callback' => 'truthmag_sanitize_image',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'truthmag_options[header_advert_image]',
        array(
            'label' => __('Upload Banner Advertisement', 'truthmag'),
            'section' => 'header_style_options',
            'active_callback' => 'truthmag_header_advertisement',

        )
    )
);


$wp_customize->add_setting(
    'truthmag_options[header_advert_image_url]',
    array(
        'default'           => $truthmag_default['header_advert_image_url'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    'truthmag_options[header_advert_image_url]',
    array(
        'label'    => __( 'Banner Advertisement URL', 'truthmag' ),
        'section'  => 'header_style_options',
        'type'     => 'text',
        'active_callback' => 'truthmag_header_advertisement',

    )
);