]> git.mxchange.org Git - friendica.git/blob - mod/pretheme.php
Don't show the local community page on single user instances
[friendica.git] / mod / pretheme.php
1 <?php
2
3 use Friendica\App;
4
5 function pretheme_init(App $a) {
6
7         if ($_REQUEST['theme']) {
8                 $theme = $_REQUEST['theme'];
9                 $info = get_theme_info($theme);
10                 if ($info) {
11                         // unfortunately there will be no translation for this string
12                         $desc = $info['description'];
13                         $version = $info['version'];
14                         $credits = $info['credits'];
15                 } else {
16                         $desc = '';
17                         $version = '';
18                         $credits = '';
19                 }
20                 echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
21         }
22
23         killme();
24 }