<?php

/**
 * Typography Settings
 *
 * @package bakery_confectionery
 */

// Typography Settings
$wp_customize->add_section(
    'bakery_confectionery_typography_setting',
    array(
        'panel' => 'bakery_confectionery_theme_options',
        'title' => esc_html__( 'Typography Settings', 'bakery-confectionery' ),
    )
);

$wp_customize->add_setting(
    'bakery_confectionery_site_title_font',
    array(
        'default'           => 'Raleway',
        'sanitize_callback' => 'bakery_confectionery_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'bakery_confectionery_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'bakery-confectionery' ),
        'section'  => 'bakery_confectionery_typography_setting',
        'settings' => 'bakery_confectionery_site_title_font',
        'type'     => 'select',
        'choices'  => bakery_confectionery_get_all_google_font_families(),
    )
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'bakery_confectionery_site_description_font',
	array(
		'default'           => 'Raleway',
		'sanitize_callback' => 'bakery_confectionery_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'bakery_confectionery_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'bakery-confectionery' ),
		'section'  => 'bakery_confectionery_typography_setting',
		'settings' => 'bakery_confectionery_site_description_font',
		'type'     => 'select',
		'choices'  => bakery_confectionery_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'bakery_confectionery_header_font',
	array(
		'default'           => 'Mouse Memoirs',
		'sanitize_callback' => 'bakery_confectionery_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'bakery_confectionery_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'bakery-confectionery' ),
		'section'  => 'bakery_confectionery_typography_setting',
		'settings' => 'bakery_confectionery_header_font',
		'type'     => 'select',
		'choices'  => bakery_confectionery_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'bakery_confectionery_content_font',
	array(
		'default'           => 'Patrick Hand',
		'sanitize_callback' => 'bakery_confectionery_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'bakery_confectionery_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'bakery-confectionery' ),
		'section'  => 'bakery_confectionery_typography_setting',
		'settings' => 'bakery_confectionery_content_font',
		'type'     => 'select',
		'choices'  => bakery_confectionery_get_all_google_font_families(),
	)
);
