Created
July 13, 2012 18:22
-
-
Save evansolomon/3106456 to your computer and use it in GitHub Desktop.
JS Setup WordPress Theme
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 custom_js() { | |
// jQuery | |
wp_deregister_script('jquery'); | |
wp_register_script( | |
'jquery', | |
includes_url( 'js/jquery/jquery.js' ), | |
array(), | |
'1.7.2', | |
true | |
); | |
// modernizr | |
wp_enqueue_script( | |
'modernizr', | |
get_template_directory_uri() . '/js/vendor/modernizr.js', | |
array(), | |
'2.5.3', | |
false | |
); | |
// main.js | |
wp_enqueue_script( | |
'main', | |
get_template_directory_uri() . '/js/main.js', | |
array('jquery'), | |
'1.0', | |
true | |
); | |
} | |
add_action('wp_enqueue_scripts', 'custom_js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment