Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Typekit
- add_action( 'wp_enqueue_scripts', 'prefix_enqueue_scripts' );
- /**
- * Loads the main typekit Javascript. Replace your-id-here with the script name
- * provided in your Kit Editor.
- *
- * @todo Replace prefix with your theme or plugin prefix
- */
- function prefix_enqueue_scripts() {
- wp_enqueue_script( 'typekit', '//use.typekit.net/pnp6xul.js', array(), '1.0.0' );
- }
- add_action( 'wp_head', 'prefix_typekit_inline' );
- /**
- * Check to make sure the main script has been enqueued and then load the typekit
- * inline script.
- *
- * @todo Replace prefix with your theme or plugin prefix
- */
- function prefix_typekit_inline() {
- if ( wp_script_is( 'typekit', 'enqueued' ) ) {
- echo '<script type="text/javascript">try{Typekit.load();}catch(e){}</script>';
- }
- }
Add Comment
Please, Sign In to add comment