Created
July 26, 2013 18:34
-
-
Save rosshanney/6091185 to your computer and use it in GitHub Desktop.
Add jQuery migrate and fix JavaScript error
This file contains hidden or 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 | |
/* | |
Plugin name: Add jQuery migrate and fix JavaScript error | |
*/ | |
function gce_add_jquery_migrate() { | |
wp_enqueue_script( 'jquery-migrate', 'http://code.jquery.com/jquery-migrate-1.2.1.min.js', array( 'jquery') ); | |
} | |
function gce_fix_javascript_error() { | |
?> | |
<script type="text/javascript">jQuery.fn.dcAccordion = function() {};</script> | |
<?php | |
} | |
add_action( 'wp_enqueue_scripts', 'gce_add_jquery_migrate' ); | |
add_action( 'wp_head', 'gce_fix_javascript_error', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment