Created
November 27, 2012 22:42
-
-
Save aristath/4157686 to your computer and use it in GitHub Desktop.
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
function shoestrap_typography_webfont() { | |
// $webfont = get_theme_mod( 'shoestrap_google_webfonts' ); | |
$webfont = 'Open Sans'; | |
$weight = 400; | |
$f = strlen( $webfont ); | |
if ($f > 3){ | |
$webfontname = str_replace( ' ', '+', $webfont ); | |
wp_register_style( 'googleFonts', 'http://fonts.googleapis.com/css?family=' . $webfontname . ':' . $weight ); | |
wp_enqueue_style( 'googleFonts' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment