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

$wp_customize->add_section(
	'news_revolution_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'news-revolution' ),
		'panel' => 'news_revolution_theme_options',
	)
);

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

$wp_customize->add_control(
	new News_Revolution_Toggle_Switch_Custom_Control(
		$wp_customize,
		'news_revolution_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'news-revolution' ),
			'section' => 'news_revolution_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'news_revolution_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'news-revolution' ),
		'active_callback' => 'news_revolution_is_breadcrumb_enabled',
		'section'         => 'news_revolution_breadcrumb',
	)
);
