Skip to content

Commit

Permalink
Merge pull request #40 from alexplusde/theme-addon
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored Dec 17, 2024
2 parents 514cbfd + 5378020 commit d2aea8d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/speed_up_theme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

class speed_up_theme
{
public static function getUrl($file, $show_timestamp = true)
{
if ($show_timestamp) {
$timestamp = '?timestamp=' . @filemtime(rex_path::base('theme/'.$file));
}

return rex_url::assets($file) . $timestamp;
}

public static function showUrl($file, $show_timestamp = true)
{
echo self::getUrl($file, $show_timestamp);
}
}

0 comments on commit d2aea8d

Please sign in to comment.