friendica/mod/pretheme.php

26 wiersze
561 B
PHP
Czysty Zwykły widok Historia

2012-03-26 02:05:14 +00:00
<?php
use Friendica\App;
use Friendica\Core\Theme;
function pretheme_init(App $a) {
2017-04-30 04:01:26 +00:00
if ($_REQUEST['theme']) {
$theme = $_REQUEST['theme'];
$info = Theme::getInfo($theme);
2017-04-30 04:01:26 +00:00
if ($info) {
// unfortunately there will be no translation for this string
2012-07-24 02:37:00 +00:00
$desc = $info['description'];
$version = $info['version'];
$credits = $info['credits'];
2017-04-30 04:01:26 +00:00
} else {
2012-07-24 02:37:00 +00:00
$desc = '';
$version = '';
$credits = '';
}
echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
}
2018-12-26 05:40:12 +00:00
exit();
2012-03-26 02:05:14 +00:00
}