]> git.mxchange.org Git - friendica.git/blob - mod/pretheme.php
Merge remote-tracking branch 'upstream/develop' into rewrites/coding-convention
[friendica.git] / mod / pretheme.php
1 <?php
2
3 function pretheme_init(App $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'];
11                         $version = $info['version'];
12                         $credits = $info['credits'];
13                 } else {
14                         $desc = '';
15                         $version = '';
16                         $credits = '';
17                 }
18                 echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
19         }
20         killme();
21 }