<?php
/**
 * Typography
 *
 * @package Construktly
 */

$wp_customize->add_section(
	'construktly_typography',
	array(
		'panel' => 'construktly_theme_options',
		'title' => esc_html__( 'Typography', 'construktly' ),
	)
);

// Typography - Site Title Font.
$wp_customize->add_setting(
	'construktly_site_title_font',
	array(
		'default'           => 'Roboto',
		'sanitize_callback' => 'construktly_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construktly_site_title_font',
	array(
		'label'    => esc_html__( 'Site Title Font Family', 'construktly' ),
		'section'  => 'construktly_typography',
		'settings' => 'construktly_site_title_font',
		'type'     => 'select',
		'choices'  => construktly_get_all_google_font_families(),
	)
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'construktly_site_description_font',
	array(
		'default'           => 'Roboto',
		'sanitize_callback' => 'construktly_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construktly_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'construktly' ),
		'section'  => 'construktly_typography',
		'settings' => 'construktly_site_description_font',
		'type'     => 'select',
		'choices'  => construktly_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'construktly_header_font',
	array(
		'default'           => 'Roboto',
		'sanitize_callback' => 'construktly_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construktly_header_font',
	array(
		'label'    => esc_html__( 'Header Font Family', 'construktly' ),
		'section'  => 'construktly_typography',
		'settings' => 'construktly_header_font',
		'type'     => 'select',
		'choices'  => construktly_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'construktly_body_font',
	array(
		'default'           => 'Roboto',
		'sanitize_callback' => 'construktly_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'construktly_body_font',
	array(
		'label'    => esc_html__( 'Body Font Family', 'construktly' ),
		'section'  => 'construktly_typography',
		'settings' => 'construktly_body_font',
		'type'     => 'select',
		'choices'  => construktly_get_all_google_font_families(),
	)
);
