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,5 +1,4 @@
<?php
class Windycoys_Walker_Comment extends Walker_Comment {
function start_el(&$output, $comment, $depth = 0) {
$id = $comment->comment_ID;
@@ -84,3 +83,11 @@ function windycoys_search_posts_per_page($query) {
return $query;
}
add_filter('pre_get_posts', 'windycoys_search_posts_per_page');
function windycoys_get_deploy_timestamp() {
if (file_exists(__DIR__ . '/.timestamp')) {
$timestamp = file_get_contents(__DIR__ . '/.timestamp');
return $timestamp;
}
return false;
}