$section){ if( ! empty($showFonts) ){ $family = get_theme_mod( $array_font_sections[$id] ); $fonts .= '|'.$family; $enqueueFonts = 1; } } if($enqueueFonts == 1){ $fonts = ltrim($fonts, '|'); $url = add_query_arg('family', urlencode($fonts), "//fonts.googleapis.com/css" ); wp_enqueue_style('cafe-express-google-fonts', $url); } else { // Return nothing if google fonts have not been selected from the customizer. return; } } add_action('wp_enqueue_scripts', 'cafe_express_google_fonts');