Created
April 6, 2016 21:23
-
-
Save lots0logs/2d42ed6e371c2e8fe1812d663e72f53f to your computer and use it in GitHub Desktop.
WordPress :: Divi Theme :: Disable Default Open Sans Font
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 | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function et_divi_fonts_url() { | |
$fonts_url = ''; | |
/* Translators: If there are characters in your language that are not | |
* supported by Open Sans, translate this to 'off'. Do not translate | |
* into your own language. | |
*/ | |
$open_sans = _x( 'off', 'Open Sans font: on or off', 'Divi' ); | |
if ( 'off' !== $open_sans ) { | |
$font_families = array(); | |
if ( 'off' !== $open_sans ) | |
$font_families[] = 'Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800'; | |
$protocol = is_ssl() ? 'https' : 'http'; | |
$query_args = array( | |
'family' => implode( '%7C', $font_families ), | |
'subset' => 'latin,latin-ext', | |
); | |
$fonts_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ); | |
} | |
return $fonts_url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm. Didn't work for me.