Last active
September 13, 2015 09:11
-
-
Save neilgee/65346978f0d2404c581e to your computer and use it in GitHub Desktop.
SVG Fallabacks
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
svgeezy.init(false, 'png'); |
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
svgeezy.init('nocheck', 'png'); // this will tell the plugin to not check images with a class of 'nocheck' |
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
<?php //<~ don't add me in | |
//* Loads SVG fallbacks | |
add_action( 'wp_enqueue_scripts', 'svgeezy_enqueue_scripts' ); | |
function svgeezy_enqueue_scripts() { | |
wp_enqueue_script( 'svgeezy', get_bloginfo( 'stylesheet_directory' ) . '/js/svgeezy.min.js', array(), '1.0.0', true ); | |
wp_enqueue_script( 'svgeezy-init', get_bloginfo( 'stylesheet_directory' ) . '/js/svgeezy-init.js', array('svgeezy'), '1.0.0', true ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment