<?php
/**
 * Breadcrumb
 *
 * @package Zenith Blog
 */

$wp_customize->add_section(
	'zenith_blog_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'zenith-blog' ),
		'panel' => 'zenith_blog_theme_options',
	)
);

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

$wp_customize->add_control(
	new Zenith_Blog_Toggle_Switch_Custom_Control(
		$wp_customize,
		'zenith_blog_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'zenith-blog' ),
			'section' => 'zenith_blog_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'zenith_blog_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'zenith-blog' ),
		'active_callback' => 'zenith_blog_is_breadcrumb_enabled',
		'section'         => 'zenith_blog_breadcrumb',
	)
);
