diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/pretheme.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mod/pretheme.php b/mod/pretheme.php index 5a71bbe53..0efa587d8 100644 --- a/mod/pretheme.php +++ b/mod/pretheme.php @@ -1,6 +1,16 @@ <?php function pretheme_init(&$a) { - if($_REQUEST['theme']) echo json_encode(array('img' => get_theme_screenshot($_REQUEST['theme']))); + + 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(); } |