Last active
March 13, 2018 11:05
-
-
Save hostz-frank/8ccb5d86fc7b7353e797c90bf795a36b to your computer and use it in GitHub Desktop.
Im Divi-Theme das Laden externer Google-Fonts abschalten. / Disable external pulled web fonts from Google for the Divi theme
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
<?php | |
// Copy the code below into your Divi child(!) theme's functions.php | |
/** | |
* Disable external font load from Google. | |
* | |
* Useful after putting Google fonts on your own server; | |
* see https://google-webfonts-helper.herokuapp.com/fonts | |
*/ | |
add_action( 'wp_enqueue_scripts', 'disable_external_divi_font_load', 12 ); | |
function disable_external_divi_font_load() { | |
wp_dequeue_style( 'divi-fonts' ); | |
} | |
// Fallback: | |
if( ! function_exists( 'et_divi_fonts_url' ) ): | |
function et_divi_fonts_url() { | |
return ''; | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment