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

$wp_customize->add_section(
	'news_steam_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'news-steam' ),
		'panel' => 'news_steam_theme_options',
	)
);

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

$wp_customize->add_control(
	new News_Steam_Toggle_Switch_Custom_Control(
		$wp_customize,
		'news_steam_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'news-steam' ),
			'section' => 'news_steam_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'news_steam_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'news-steam' ),
		'active_callback' => 'news_steam_is_breadcrumb_enabled',
		'section'         => 'news_steam_breadcrumb',
	)
);
