Skip to content

Instantly share code, notes, and snippets.

@davidsword
Last active February 3, 2018 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsword/23c5e61905600787dc8c6d991969f8b2 to your computer and use it in GitHub Desktop.
Save davidsword/23c5e61905600787dc8c6d991969f8b2 to your computer and use it in GitHub Desktop.
<?php
wp_enqueue_script(
'your-plugin', // handle
plugins_url( 'your-file.js', __FILE__ ), // file
array( 'jquery' ), // dependencies
filemtime( plugin_dir_path( __FILE__ ) . '/your-file.js' ) // version: modified filemtime
// filemtime( get_template_directory() . '/your-file.js' ) // or this if a THEME not a PLUGIN
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment