<?php

/**
 * Typography Settings
 *
 * @package construction_engineer
 */

// Typography Settings
$wp_customize->add_section(
    'construction_engineer_typography_setting',
    array(
        'panel' => 'construction_engineer_theme_options',
        'title' => esc_html__( 'Typography Settings', 'construction-engineer' ),
    )
);

$wp_customize->add_setting(
    'construction_engineer_site_title_font',
    array(
        'default'           => 'Raleway',
        'sanitize_callback' => 'construction_engineer_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'construction_engineer_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'construction-engineer' ),
        'section'  => 'construction_engineer_typography_setting',
        'settings' => 'construction_engineer_site_title_font',
        'type'     => 'select',
        'choices'  => construction_engineer_get_all_google_font_families(),
    )
);

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

$wp_customize->add_control(
	'construction_engineer_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'construction-engineer' ),
		'section'  => 'construction_engineer_typography_setting',
		'settings' => 'construction_engineer_site_description_font',
		'type'     => 'select',
		'choices'  => construction_engineer_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'construction_engineer_header_font',
	array(
		'default'           => 'Raleway',
		'sanitize_callback' => 'construction_engineer_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construction_engineer_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'construction-engineer' ),
		'section'  => 'construction_engineer_typography_setting',
		'settings' => 'construction_engineer_header_font',
		'type'     => 'select',
		'choices'  => construction_engineer_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'construction_engineer_content_font',
	array(
		'default'           => 'Tenor Sans',
		'sanitize_callback' => 'construction_engineer_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construction_engineer_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'construction-engineer' ),
		'section'  => 'construction_engineer_typography_setting',
		'settings' => 'construction_engineer_content_font',
		'type'     => 'select',
		'choices'  => construction_engineer_get_all_google_font_families(),
	)
);
