<?php
/**
 * Typography
 *
 * @package Prime Mag
 */

$wp_customize->add_section(
	'prime_mag_typography',
	array(
		'panel' => 'prime_mag_theme_options',
		'title' => esc_html__( 'Typography', 'prime-mag' ),
	)
);

// Typography - Site Title Font.
$wp_customize->add_setting(
	'prime_mag_site_title_font',
	array(
		'default'           => 'Hind',
		'sanitize_callback' => 'prime_mag_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'prime_mag_site_title_font',
	array(
		'label'    => esc_html__( 'Site Title Font Family', 'prime-mag' ),
		'section'  => 'prime_mag_typography',
		'settings' => 'prime_mag_site_title_font',
		'type'     => 'select',
		'choices'  => prime_mag_get_all_google_font_families(),
	)
);

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

$wp_customize->add_control(
	'prime_mag_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'prime-mag' ),
		'section'  => 'prime_mag_typography',
		'settings' => 'prime_mag_site_description_font',
		'type'     => 'select',
		'choices'  => prime_mag_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'prime_mag_header_font',
	array(
		'default'           => 'Exo',
		'sanitize_callback' => 'prime_mag_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'prime_mag_header_font',
	array(
		'label'    => esc_html__( 'Header Font Family', 'prime-mag' ),
		'section'  => 'prime_mag_typography',
		'settings' => 'prime_mag_header_font',
		'type'     => 'select',
		'choices'  => prime_mag_get_all_google_font_families(),
	)
);

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

$wp_customize->add_control(
	'prime_mag_body_font',
	array(
		'label'    => esc_html__( 'Body Font Family', 'prime-mag' ),
		'section'  => 'prime_mag_typography',
		'settings' => 'prime_mag_body_font',
		'type'     => 'select',
		'choices'  => prime_mag_get_all_google_font_families(),
	)
);
