Created
July 18, 2019 17:26
-
-
Save generatepress/2bb2667c9413e29579288687add966de to your computer and use it in GitHub Desktop.
Integrate the Custom Fonts (https://wordpress.org/plugins/custom-fonts/) plugin with the GP Customizer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'generate_typography_default_fonts', function( $fonts ) { | |
if ( ! class_exists( 'Bsf_Custom_Fonts_Taxonomy' ) ) { | |
return $fonts; | |
} | |
$all_fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts(); | |
if ( ! empty( $all_fonts ) ) { | |
foreach ( $all_fonts as $font_family_name => $fonts_url ) { | |
$fonts[] = $font_family_name; | |
} | |
} | |
return $fonts; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment