Add timestamp to CSS and JS URLs to cachebust

This commit is contained in:
2018-12-15 21:24:48 +00:00
parent 0abe53e3aa
commit 7bcd2008f0
8 changed files with 3625 additions and 5381 deletions

View File

@@ -1 +1,8 @@
<script type="text/javascript" src="<?php echo get_template_directory_uri() ?>/bundle.js"></script>
<?php
$js_url = get_template_directory_uri() . '/bundle.js';
$deploy_timestamp = windycoys_get_deploy_timestamp();
if ($deploy_timestamp) {
$js_url .= '?t=' . $deploy_timestamp;
}
?>
<script type="text/javascript" src="<?php echo $js_url ?>"></script>