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

$wp_customize->add_section(
	'routine_news_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'routine-news' ),
		'panel' => 'routine_news_theme_options',
	)
);

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

$wp_customize->add_control(
	new Routine_News_Toggle_Switch_Custom_Control(
		$wp_customize,
		'routine_news_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'routine-news' ),
			'section' => 'routine_news_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'routine_news_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'routine-news' ),
		'active_callback' => 'routine_news_is_breadcrumb_enabled',
		'section'         => 'routine_news_breadcrumb',
	)
);
