Skip to content

Instantly share code, notes, and snippets.

@Ataurr
Last active October 7, 2020 06:51
Show Gist options
  • Save Ataurr/d58aa9b15cc1e1686f671e2c74625d9e to your computer and use it in GitHub Desktop.
Save Ataurr/d58aa9b15cc1e1686f671e2c74625d9e to your computer and use it in GitHub Desktop.
Add Unyson custom fonts in font list
`function _filter_theme_add_hind_google_font($fonts) {
if(defined('FW')) {
return '';
}
$fonts['Roboto'] = array(
'family' => 'Roboto',
'variants' => array( 400, 700 ),
);
ksort($fonts);
return $fonts;
}
add_filter('fw_google_fonts', '_filter_theme_add_hind_google_font');`
####add as a standard font
function startuplanding_filter_theme_typography_custom_fonts( $fonts ) {
array_push( $fonts, "lane" );
return $fonts;
}
add_filter( 'fw_option_type_typography_standard_fonts', 'startuplanding_filter_theme_typography_custom_fonts' );
###For typography-v2 option type
`fw_option_type_typography_v2_standard_fonts`
More details v2 https://github.com/ThemeFuse/Unyson/blob/master/framework/includes/option-types/typography-v2/class-fw-option-type-typography-v2.php#L54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment