Skip to content

Instantly share code, notes, and snippets.

@xavierartot
Created March 5, 2014 16:33
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 xavierartot/9370766 to your computer and use it in GitHub Desktop.
Save xavierartot/9370766 to your computer and use it in GitHub Desktop.
charging in the front Google font
78 if(esc_attr( get_option('font-type') ) == 'google' ) {
79 $fonts_l = esc_attr( get_option('fonts-l') );
80 global $fonts_l;
81 add_action('wp_print_styles', 'add_google_fonts');
82 function add_google_fonts() {
83 global $fonts_l;
84 $fonts_l = 'http://fonts.googleapis.com/css?family='.trim($fonts_l);
85 wp_register_style('GoogleFonts', $fonts_l);
86 wp_enqueue_style('GoogleFonts');
87 }
88 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment