Created
November 28, 2011 10:47
-
-
Save pdewouters/1399949 to your computer and use it in GitHub Desktop.
enqueue scripts in plugin the right way
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
// guess current plugin directory URL | |
$plugin_url = plugin_dir_url(__FILE__); | |
//enqueue script | |
wp_enqueue_script('wpc_script', $plugin_url . 'js/script.js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment