Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The following snippet includes retina.js in your WordPress-powered website. Copy and paste the following code into your functions.php theme file.
function jg_load_retina_script()
{
if (!is_admin()) {
wp_register_script('retina', '//cdnjs.cloudflare.com/ajax/libs/retina.js/1.0.1/retina.js', array(), '1.0.1');
wp_enqueue_script('retina');
}
}
add_action('wp_footer', 'jg_load_retina_script');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.