summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 7ec58e79..144cdec1 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -93,6 +93,25 @@
}
}
+ function loadThemeConfig($_theme) {
+ global $config;
+
+ // Load theme information into $theme
+ include $config['dir']['homepage'] . '/' . $_theme . '/theme.php';
+ return $theme;
+ }
+
+ function themeSettings() {
+ $query = query("SELECT * FROM `theme_settings`") or error(db_error());
+ $settings = Array();
+
+ while($s = $query->fetch()) {
+ $settings[$s['name']] = $s['value'];
+ }
+
+ return $settings;
+ }
+
function sprintf3($str, $vars, $delim = '%') {
$replaces = array();
foreach($vars as $k => $v) {