Unyson
Unyson copied to clipboard
After update google font not working
After update google font not woking but everything work before. Is there i am missing something ??
//google font
if (!function_exists('_action_theme_process_google_fonts')) {
function _action_theme_process_google_fonts() {
$include_from_google = array();
$google_fonts = fw_get_google_fonts();
$heading_title = fw_get_db_settings_option('heading_title');
$heading_subtitle = fw_get_db_settings_option('heading_subtitle');
if (isset($google_fonts[$heading_title['family']])) {
$include_from_google[$heading_title['family']] = $google_fonts[$heading_title['family']];
}
if (isset($google_fonts[$heading_subtitle['family']])) {
$include_from_google[$heading_subtitle['family']] = $google_fonts[$heading_subtitle['family']];
}
$google_fonts_links = fw_theme_get_remote_fonts($include_from_google);
// set a option in db for save google fonts link
update_option('fw_theme_google_fonts_link', $google_fonts_links);
}
add_action('fw_settings_form_saved', '_action_theme_process_google_fonts', 999, 2);
}
if (!function_exists('fw_theme_get_remote_fonts')) :
function fw_theme_get_remote_fonts($include_from_google) {
/**
* Get remote fonts
* @param array $include_from_google
*/
if (!sizeof($include_from_google)) {
return '';
}
$html = "