summaryrefslogtreecommitdiffstats
path: root/functions.php
diff options
context:
space:
mode:
authorEltrac <45323514+BigCoke233@users.noreply.github.com>2019-12-20 20:10:25 +0800
committerGitHub <noreply@github.com>2019-12-20 20:10:25 +0800
commit1d13395cbe8dbc813bbaa2beb9ffd914bd1331fa (patch)
tree1916d110f4282b4b42599d85af850abdcd6942e7 /functions.php
parent9b6d32ecaac85cdc671b549f48ce5653dec52264 (diff)
parentf145340482111518f91e0ffce7fb2ea1b4964ef5 (diff)
Merge pull request #19 from outtimes/master
年⭐底⭐劲⭐爆 明🏮年🏮再🏮更
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 9490c0d..85b0afc 100644
--- a/functions.php
+++ b/functions.php
@@ -75,3 +75,17 @@ array_push($views, $cid);
}
echo $row['views'];
}
+/**
+ * 自动生成引用
+ */
+function generate_require($files,$type,$cdn = NULL) {
+ if ($cdn)
+ $path = $cdn.themeVersion()."/";
+ else $path = Helper::options()->themeUrl("","Miracles");
+ foreach ($files as $file) {
+ if ($type == "js")
+ echo "<script src=".$path."assets/".$type."/".$file.".".$type."></script>";
+ elseif ($type == "css")
+ echo "<link rel=\"stylesheet\" href=".$path."assets/".$type."/".$file.".".$type." />";
+ }
+} \ No newline at end of file