Created
June 6, 2015 15:12
-
-
Save syrxw/f55d14330dc9066227b4 to your computer and use it in GitHub Desktop.
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 | |
function my_scripts() { | |
wp_register_script( | |
'angularjs', | |
get_stylesheet_directory_uri() . '/bower_components/angular/angular.min.js' | |
); | |
wp_register_script( | |
'angularjs-route', | |
get_stylesheet_directory_uri() . '/bower_components/angular-route/angular-route.min.js' | |
); | |
wp_enqueue_script( | |
'my-scripts', | |
get_stylesheet_directory_uri() . '/js/scripts.js', | |
array( 'angularjs', 'angularjs-route' ) | |
); | |
wp_localize_script( | |
'my-scripts', | |
'myLocalized', | |
array( | |
'partials' => trailingslashit( get_template_directory_uri() ) . 'partials/' | |
) | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment