mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
theme description with preview (non-translatable unfortunately)
This commit is contained in:
parent
b5d0315d55
commit
4c585f759f
3 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,16 @@
|
|||
<?php
|
||||
|
||||
function pretheme_init(&$a) {
|
||||
if($_REQUEST['theme']) echo json_encode(array('img' => get_theme_screenshot($_REQUEST['theme'])));
|
||||
|
||||
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'] . ' ' . $info['version'];
|
||||
}
|
||||
else $desc = '';
|
||||
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc));
|
||||
}
|
||||
killme();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue