Created
November 20, 2014 15:50
-
-
Save ethanclevenger91/595ee21a082e919cd900 to your computer and use it in GitHub Desktop.
Automated Cache Busting. This works by adding the file's change time to the end of the url (last argument of the call)
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 | |
wp_enqueue_style('slug', get_template_directory_uri().'/css/slug.css', array(), filemtime(get_template_directory().'/css/slug.css')); | |
wp_enqueue_script('slug', get_template_directory_uri().'/js/slug.js', array(), filemtime(get_template_directory().'/js/slug.js')); | |
//Note the second argument is URL based while the last argument is a file path. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment