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,3 +1,10 @@
<?php
$css_url = get_template_directory_uri() . '/style.css';
$deploy_timestamp = windycoys_get_deploy_timestamp();
if ($deploy_timestamp) {
$css_url .= '?t=' . $deploy_timestamp;
}
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
@@ -7,7 +14,7 @@
<meta name="theme-color" content="#4b88b6">
<meta name="description" content="<?php bloginfo('description'); ?>">
<?php wp_head(); ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css">
<link rel="stylesheet" href="<?php echo $css_url ?>">
<link href="//fonts.googleapis.com/css?family=Open+Sans|Raleway:700" rel="stylesheet">
</head>
<body>