Skip to content

Commit

Permalink
Load coc.css, cocold.css & clockAnimation.js with version of last mod…
Browse files Browse the repository at this point in the history
…ified time
  • Loading branch information
matboehm committed Feb 20, 2021
1 parent ea45423 commit d0b1d89
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions coc/classes/core/ScriptManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function initCoCNewScripts()
wp_enqueue_style(
'coc',
ClockOfChange::$pluginRootUri . 'assets/css/coc.css',
[]
[],
filemtime(ClockOfChange::$pluginRootPath . 'assets/css/coc.css')
);

wp_enqueue_style(
Expand Down Expand Up @@ -97,7 +98,8 @@ public function initCoCOldScripts()
wp_enqueue_style(
'coc-old',
ClockOfChange::$pluginRootUri . 'assets/css/cocold.css',
[]
[],
filemtime(ClockOfChange::$pluginRootPath . 'assets/css/cocold.css')
);

wp_enqueue_script(
Expand Down Expand Up @@ -136,7 +138,7 @@ public function initCoCOldScripts()
'coc-clock-animation',
ClockOfChange::$pluginRootUri . 'assets/js/old/clockAnimation.js',
['jquery', 'coc-greensock-timelinemax', 'coc-greensock-tweenmax', 'coc-enquire'],
bin2hex(random_bytes(16)),
filemtime(ClockOfChange::$pluginRootPath . 'assets/js/old/clockAnimation.js'),
true
);

Expand Down

0 comments on commit d0b1d89

Please sign in to comment.