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

$wp_customize->add_section(
	'mindful_blog_breadcrumb',
	array(
		'title' => esc_html__( 'Breadcrumb', 'mindful-blog' ),
		'panel' => 'mindful_blog_theme_options',
	)
);

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

$wp_customize->add_control(
	new Mindful_Blog_Toggle_Switch_Custom_Control(
		$wp_customize,
		'mindful_blog_enable_breadcrumb',
		array(
			'label'   => esc_html__( 'Enable Breadcrumb', 'mindful-blog' ),
			'section' => 'mindful_blog_breadcrumb',
		)
	)
);

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

$wp_customize->add_control(
	'mindful_blog_breadcrumb_separator',
	array(
		'label'           => esc_html__( 'Separator', 'mindful-blog' ),
		'active_callback' => 'mindful_blog_is_breadcrumb_enabled',
		'section'         => 'mindful_blog_breadcrumb',
	)
);
