add(array( 'selectors' => array( 'body' ), 'declarations' => array( 'font-family' => $stack ) )); } // Heading font $heading = avish_mod(PREFIX . 'heading-font'); $stack = customizer_library_get_font_stack($heading); if ($heading !== customizer_library_get_default(PREFIX . 'heading-font')) { Customizer_Library_Styles()->add(array( 'selectors' => array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', ), 'declarations' => array( 'font-family' => $stack ) )); } } endif; add_action('avish_customizer_library_styles', 'avish_customizer_fonts'); if (!function_exists('avish_enqueue_fonts')) : /** * Enqueue Google Fonts * * @since 1.0.0 */ function avish_enqueue_fonts() { // Font options $fonts = array( avish_mod(PREFIX . 'text-font'), avish_mod(PREFIX . 'heading-font') ); $font_uri = customizer_library_get_google_font_uri($fonts); // Load Google Fonts wp_enqueue_style('avish-custom-fonts', $font_uri, array(), null); } endif; add_action('wp_enqueue_scripts', 'avish_enqueue_fonts');