Last active
March 4, 2016 15:59
-
-
Save hasinhayder/87d171ceebf6066d944e to your computer and use it in GitHub Desktop.
generate wp_enqueue_script calls for all the js files in the current directory
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
#!/usr/bin/env php | |
<?php | |
foreach(glob("*.js") as $js){ | |
echo "wp_enqueue_script( 'wptheme-{$js}', get_template_directory_uri().'/js/{$js}', array('jquery'),'1.0',true);\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment