Hi guys,
I’m having a devil of a time in removing google fonts. I am serving them locally and have included excerpts to remove Google Fonts from GP and one to include the local fonts in customizer:
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'generate-fonts' );
} );
add_filter( 'generate_typography_default_fonts', function( $fonts ) {
$fonts[] = 'Open Sans';
$fonts[] = 'Carrois Gothic';
$fonts[] = 'Ico Moon';
return $fonts;
} );
add_action( 'admin_init', function() {
add_filter( 'generate_google_fonts_array', '__return_empty_array' );
} );
If I check on a tool like GTMetrix for example the google font api doesn’t show as loading. However, when I check in Chrome dev tools it shows:
https://www.screencast.com/t/m6GXaUIDtf8
After clearing caches it is still being called. I have been unable to work out where this call is coming from.
I have tried a couple of plugin options to remove as well, but none have worked.
Please can you advise if there is something left in GP that I need to remove?
Thanks again you for your help.
Michael.