summaryrefslogtreecommitdiff
path: root/src/web/core/core.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/core/core.php')
-rw-r--r--src/web/core/core.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/web/core/core.php b/src/web/core/core.php
index d15436a..cfeeea9 100644
--- a/src/web/core/core.php
+++ b/src/web/core/core.php
@@ -51,6 +51,17 @@ abstract class Core {
}
/**
+ * Loads a js html link
+ * @param string $path - the path to the js file
+ */
+ public static function link_js(string $path): string
+ {
+ $stamp = Core::asset_stamp($path);
+ $href = Core::get_url("public/{$path}?stamp={$stamp}");
+ return '<script src="'. $href .'"></script>';
+ }
+
+ /**
* Loads a css html link
* @param string $path - the path to the css file
*/