<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}  
    
    /*********************
    Breadcrumbs
    *******************/
    $wp_customize->add_section('magazinestyle_breadcrumbs_section',
    array(
        'title'       => __( 'Breadcrumbs', 'magazine-style' ),
        'capability'  => 'edit_theme_options',						
        'panel'			=> 'magazinestyle_single_postsset',
        'priority'    => apply_filters( 'magazinestyle_breadcrumbs_section_priority', 10 ),
    ));


    $wp_customize->add_setting(
        'magazinestyle_header_heading',
        array(
            'sanitize_callback' => 'wp_kses',
        ));

    $wp_customize->add_control(
        new magazinestyle_Customizer_Heading_Control(
            $wp_customize,
            'magazinestyle_header_heading',
            array(
                'label'    => esc_html__( 'Choose breadcrumbs Style', 'magazine-style' ),
                'section'  => 'magazinestyle_breadcrumbs_section',
                'priority' => 15,
            )));
    $wp_customize->add_setting(
    'magazinestyle_breadcrumbs_style',
    array(
        'default'           => 'styleone',
        'type'              => 'theme_mod',
        'transport'   => 'postMessage',
        'sanitize_callback' => 'magazinestyle_customize_sanitize_select',
        'capability'        => 'edit_theme_options',
    )
);

$wp_customize->add_control(
    new magazinestyle_Image_Radio_Control(
        $wp_customize,
        'magazinestyle_breadcrumbs_style',
        array(
            'label'       => __( 'Breadcrumbs Style (Pro Only)', 'magazine-style' ),
            'section'     => 'magazinestyle_breadcrumbs_section',
            'choices'     => array(
                'styleone'  => get_template_directory_uri() . '/images/breadcrumbs/breadcrumbsstyle1.jpg',
                'styletwo' => get_template_directory_uri() . '/images/breadcrumbs/breadcrumbsstyle2.jpg',
                'stylethree' => get_template_directory_uri() . '/images/breadcrumbs/breadcrumbsstyle3.jpg',
                'stylefour' => get_template_directory_uri() . '/images/breadcrumbs/breadcrumbsstyle4.jpg',
            ),
            'priority'    => apply_filters( 'magazinestyle_breadcrumbs_style_priority', 20 ),
        )
    ));
    
    $wp_customize->add_setting(
        'magazinestyle_breadcrumbs_headingset',
        array(
            'sanitize_callback' => 'wp_kses',
        ));


        $wp_customize->add_control(
            new magazinestyle_Customizer_Heading_Control(
                $wp_customize,
                'magazinestyle_breadcrumbs_headingset',
                array(
                    'label'    => esc_html__( 'Breadcrumbs Settings', 'magazine-style' ),
                    'section'  => 'magazinestyle_breadcrumbs_section',
                    'priority' => 25,
                )));
        
        $wp_customize->add_setting('magazinestyle_breadcrumbs_on',	
        array(
            'default'			=> 'enable',
            'type'				=> 'theme_mod',
            'capability'		=> 'edit_theme_options',
            'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
        ));
    $wp_customize->add_control('magazinestyle_breadcrumbs_on',
         array (                             
            'type' => 'radio',
            'label' => __('Enable or Disable Breadcrumbs','magazine-style'),
            'settings'   => 'magazinestyle_breadcrumbs_on',
            'section' => 'magazinestyle_breadcrumbs_section',
            'choices' => array(
                'enable' => __('Enable','magazine-style'),
                'disable' => __('Disable','magazine-style'),
             ),
             'priority'    => apply_filters( 'magazinestyle_breadcrumbs_on_priority', 30 ),
         ));