<?php
/**
 * Typography Setting
 *
 * @package charitable_funds
 */

// Typography Setting
$wp_customize->add_section(
    'charitable_funds_typography_setting',
    array(
        'panel' => 'charitable_funds_theme_options',
        'title' => esc_html__( 'Typography Setting', 'charitable-funds' ),
    )
);

$wp_customize->add_setting(
    'charitable_funds_site_title_font',
    array(
        'default'           => 'Sora',
        'sanitize_callback' => 'charitable_funds_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'charitable_funds_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'charitable-funds' ),
        'section'  => 'charitable_funds_typography_setting',
        'settings' => 'charitable_funds_site_title_font',
        'type'     => 'select',
        'choices'  => charitable_funds_get_all_google_font_families(),
    )
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'charitable_funds_site_description_font',
	array(
		'default'           => 'Sora',
		'sanitize_callback' => 'charitable_funds_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'charitable_funds_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'charitable-funds' ),
		'section'  => 'charitable_funds_typography_setting',
		'settings' => 'charitable_funds_site_description_font',
		'type'     => 'select',
		'choices'  => charitable_funds_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'charitable_funds_header_font',
	array(
		'default'           => 'Sora',
		'sanitize_callback' => 'charitable_funds_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'charitable_funds_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'charitable-funds' ),
		'section'  => 'charitable_funds_typography_setting',
		'settings' => 'charitable_funds_header_font',
		'type'     => 'select',
		'choices'  => charitable_funds_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'charitable_funds_content_font',
	array(
		'default'           => 'Sora',
		'sanitize_callback' => 'charitable_funds_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'charitable_funds_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'charitable-funds' ),
		'section'  => 'charitable_funds_typography_setting',
		'settings' => 'charitable_funds_content_font',
		'type'     => 'select',
		'choices'  => charitable_funds_get_all_google_font_families(),
	)
);