Created
October 27, 2015 08:45
-
-
Save walterebert/80938bf20cdc1c126dff to your computer and use it in GitHub Desktop.
WordPress snippet: Make jQuery backward compatible
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 | |
function my_compat_jquery() { | |
echo "<script>var $ = $ || jQuery;</script>\n"; | |
} | |
add_action( 'wp_head', 'my_compat_jquery', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment