Skip to content

Instantly share code, notes, and snippets.

@gbissland
Created August 22, 2017 23:53
Show Gist options
  • Save gbissland/1d89270cd0c7c664a32316e337f32d98 to your computer and use it in GitHub Desktop.
Save gbissland/1d89270cd0c7c664a32316e337f32d98 to your computer and use it in GitHub Desktop.
Adding Typekit Font to Customizer in BB Theme
//must first add typkit js id in page header scripts
add_action( 'init', 'customize_font_list' );
function customize_font_list(){
$custom_fonts = array(
'proxima-nova' => array(
'fallback' => 'sans-serif',
'weights' => array(
'100',
'300',
'400',
'700'
)
)
);
foreach($custom_fonts as $name => $settings){
// Add to Theme Customizer
if(class_exists('FLFontFamilies') && isset(FLFontFamilies::$system)){
FLFontFamilies::$system[$name] = $settings;
}
// Add to Page Builder
if(class_exists('FLBuilderFontFamilies') && isset(FLBuilderFontFamilies::$system)){
FLBuilderFontFamilies::$system[$name] = $settings;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment