<?php

/**
 * Breadcrumb
 *
 * @package Charity_Elite
 */

$wp_customize->add_section(
	'charity_elite_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'charity-elite' ),
		'panel' => 'charity_elite_theme_options',
	)
);

// Breadcrumb - Enable Breadcrumb.
$wp_customize->add_setting(
	'charity_elite_enable_breadcrumb',
	array(
		'sanitize_callback' => 'charity_elite_sanitize_switch',
		'default'           => true,
	)
);

$wp_customize->add_control(
	new Charity_Elite_Toggle_Switch_Custom_Control(
		$wp_customize,
		'charity_elite_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'charity-elite' ),
			'section' => 'charity_elite_breadcrumb',
		)
	)
);

// Breadcrumb - Separator.
$wp_customize->add_setting(
	'charity_elite_breadcrumb_separator',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => '/',
	)
);

$wp_customize->add_control(
	'charity_elite_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'charity-elite' ),
		'active_callback' => 'charity_elite_is_breadcrumb_enabled',
		'section'         => 'charity_elite_breadcrumb',
	)
);
