Skip to content

Instantly share code, notes, and snippets.

@aristath
Created November 27, 2012 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aristath/4157686 to your computer and use it in GitHub Desktop.
Save aristath/4157686 to your computer and use it in GitHub Desktop.
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