mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
d07536e032
Update function names and calls for Theme class.
25 lines
563 B
PHP
25 lines
563 B
PHP
<?php
|
|
|
|
use Friendica\App;
|
|
use Friendica\Core\Theme;
|
|
|
|
function pretheme_init(App $a) {
|
|
|
|
if ($_REQUEST['theme']) {
|
|
$theme = $_REQUEST['theme'];
|
|
$info = Theme::getInfo($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(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
|
|
}
|
|
|
|
killme();
|
|
}
|