]> git.mxchange.org Git - friendica.git/blob - mod/pretheme.php
Merge pull request #2324 from rabuzarus/0502_vier_dark
[friendica.git] / mod / pretheme.php
1 <?php
2
3 if(! function_exists('pretheme_init')) {
4 function pretheme_init(&$a) {
5
6         if($_REQUEST['theme']) {
7                 $theme = $_REQUEST['theme'];
8                 $info = get_theme_info($theme);
9                 if($info) {
10                         // unfortunately there will be no translation for this string
11                         $desc = $info['description'];
12                         $version = $info['version'];
13                         $credits = $info['credits'];
14                 }
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         killme();
23 }
24 }