<?php
/**
 * Local Google Fonts Settings
 *
 * @package Feminine_Lifestyle_Blog
 */

function feminine_lifestyle_blog_customize_register_general_fonts( $wp_customize ) {
    
    /** Local Google Fonts Settings */
    $wp_customize->add_section(
        'localfonts_settings',
        array(
            'title'    => __( 'Fonts', 'feminine-lifestyle-blog' ),
            'priority' => 60,
            'panel'    => 'general_settings',
        )
    );

    /** Locally Host Google Fonts */
    $wp_customize->add_setting(
        'ed_localgoogle_fonts',
        array(
            'default'           => false,
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_checkbox',
        )
    );
    
    $wp_customize->add_control(
        new Feminine_Lifestyle_Blog_Toggle_Control( 
            $wp_customize,
            'ed_localgoogle_fonts',
            array(
                'section'       => 'localfonts_settings',
                'label'         => __( 'Load Google Fonts Locally', 'feminine-lifestyle-blog' ),
                'description'   => __( 'This will load Google fonts from your server to speed up your site.', '' )
            )
        )
    );   
}
add_action( 'customize_register', 'feminine_lifestyle_blog_customize_register_general_fonts' );