]> git.mxchange.org Git - friendica.git/blob - mod/pretheme.php
Merge branch 'master' of https://github.com/friendica/friendica
[friendica.git] / mod / pretheme.php
1 <?php
2
3 function pretheme_init(&$a) {
4         
5         if($_REQUEST['theme']) {
6                 $theme = $_REQUEST['theme'];
7                 $info = get_theme_info($theme);
8                 if($info) {
9                         // unfortunately there will be no translation for this string
10                         $desc = $info['description'] . ' ' . $info['version'];
11                 }
12                 else $desc = '';
13                 echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc));
14         }
15         killme();
16 }