Last active
March 19, 2016 19:10
-
-
Save j-cam/483a4c738f869e98fbc5 to your computer and use it in GitHub Desktop.
A function for updating the version in the query string for a theme's default stylesheet.
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 | |
/** | |
* Updates the v= query string for | |
* theme's default stylesheet for | |
* browser cache busting etc. | |
*/ | |
function theme_wp_default_styles_version($styles) { | |
// use date versioning or semantic versioning | |
$styles->default_version = "vYYYY-MM-DD"; | |
} | |
add_action("wp_default_styles", "theme_wp_default_styles_version"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment