Created
December 30, 2015 21:36
-
-
Save mckernanin/358e4c13ab5ec323fb8c to your computer and use it in GitHub Desktop.
Enqueue Typekit Fonts
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
/** | |
* TypeKit Fonts | |
* | |
* @since Theme 1.0 | |
*/ | |
function theme_typekit() { | |
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/hjy0hsn.js'); | |
} | |
add_action( 'wp_enqueue_scripts', 'theme_typekit' ); | |
function theme_typekit_inline() { | |
if ( wp_script_is( 'theme_typekit', 'done' ) ) { ?> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
<?php } | |
} | |
add_action( 'wp_head', 'theme_typekit_inline' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment