Created
June 18, 2018 15:08
-
-
Save hostz-frank/90728618d475dba57b29e79b5076e887 to your computer and use it in GitHub Desktop.
Revisions
-
hostz-frank created this gist
Jun 18, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ <?php /* Plugin Name: Bloom without Google webfonts Description: Remove Bloom fonts loaded from Google Author: Frank Version: 0.1 */ defined( 'ABSPATH' ) || die(); add_action( 'wp_enqueue_scripts', function() { wp_deregister_style( 'et-gf-open-sans' ); }, 11 ); add_action( 'wp_footer', function() { if( function_exists( 'et_get_google_fonts' ) ) { $gfonts = et_get_google_fonts(); foreach( $gfonts as $font => $atts ) { wp_dequeue_style( 'et-gf-' . strtolower( str_replace( ' ', '-', $font ) ) ); } } }, 11 );