X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpretheme.php;h=b4eaa0553691a0492142e33fde68dbf65987ca94;hb=7034d6efbd988e7481ac6f5d6413a8925221ed6b;hp=5a71bbe53e45168b8c99498254fe05f6e631da50;hpb=629a66793c245d39ca47523a6fbc790fae0cbe3b;p=friendica.git diff --git a/mod/pretheme.php b/mod/pretheme.php index 5a71bbe53e..b4eaa05536 100644 --- a/mod/pretheme.php +++ b/mod/pretheme.php @@ -1,6 +1,24 @@ get_theme_screenshot($_REQUEST['theme']))); +use Friendica\App; + +function pretheme_init(App $a) { + + 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']; + $version = $info['version']; + $credits = $info['credits']; + } else { + $desc = ''; + $version = ''; + $credits = ''; + } + echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits)); + } + killme(); }