aboutsummaryrefslogtreecommitdiffstats
path: root/mod/pretheme.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-27 13:20:59 +0200
committerzottel <github@zottel.net>2012-03-27 13:20:59 +0200
commitfb817a29a934a68f194a42c29d3ed11da2da558f (patch)
treefdeb88be9d8545ead92c5d63a9d9af7f6a7ccc23 /mod/pretheme.php
parentfabd4f4d2ebd9d1623db7e20d6e4e8f6bd0611ff (diff)
parent928e6c7ef78d251429a7d5c1fd4fdb8e6c282d41 (diff)
downloadvolse-hubzilla-fb817a29a934a68f194a42c29d3ed11da2da558f.tar.gz
volse-hubzilla-fb817a29a934a68f194a42c29d3ed11da2da558f.tar.bz2
volse-hubzilla-fb817a29a934a68f194a42c29d3ed11da2da558f.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/pretheme.php')
-rw-r--r--mod/pretheme.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/pretheme.php b/mod/pretheme.php
new file mode 100644
index 000000000..0efa587d8
--- /dev/null
+++ b/mod/pretheme.php
@@ -0,0 +1,16 @@
+<?php
+
+function pretheme_init(&$a) {
+
+ if($_REQUEST['theme']) {
+ $theme = $_REQUEST['theme'];
+ $info = get_theme_info($theme);
+ if($info) {
+ // unfortunately there will be no translation for this string
+ $desc = $info['description'] . ' ' . $info['version'];
+ }
+ else $desc = '';
+ echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc));
+ }
+ killme();
+}