<?php
/**
 * Breadcrumb
 *
 * @package Millennium News
 */

$wp_customize->add_section(
	'millennium_news_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'millennium-news' ),
		'panel' => 'millennium_news_theme_options',
	)
);

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

$wp_customize->add_control(
	new Millennium_News_Toggle_Switch_Custom_Control(
		$wp_customize,
		'millennium_news_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'millennium-news' ),
			'section' => 'millennium_news_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'millennium_news_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'millennium-news' ),
		'active_callback' => 'millennium_news_is_breadcrumb_enabled',
		'section'         => 'millennium_news_breadcrumb',
	)
);
