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

$wp_customize->add_section(
	'scope_news_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'scope-news' ),
		'panel' => 'scope_news_theme_options',
	)
);

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

$wp_customize->add_control(
	new Scope_News_Toggle_Switch_Custom_Control(
		$wp_customize,
		'scope_news_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'scope-news' ),
			'section' => 'scope_news_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'scope_news_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'scope-news' ),
		'active_callback' => 'scope_news_is_breadcrumb_enabled',
		'section'         => 'scope_news_breadcrumb',
	)
);
