2012-03-26 02:05:14 +00:00
|
|
|
<?php
|
|
|
|
|
2016-12-20 09:58:55 +00:00
|
|
|
function pretheme_init(App &$a) {
|
2016-02-07 14:11:34 +00:00
|
|
|
|
2012-03-27 01:15:10 +00:00
|
|
|
if($_REQUEST['theme']) {
|
|
|
|
$theme = $_REQUEST['theme'];
|
|
|
|
$info = get_theme_info($theme);
|
|
|
|
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'];
|
2012-03-27 01:15:10 +00:00
|
|
|
}
|
2012-07-24 02:37:00 +00:00
|
|
|
else {
|
|
|
|
$desc = '';
|
|
|
|
$version = '';
|
|
|
|
$credits = '';
|
|
|
|
}
|
|
|
|
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
|
2012-03-27 01:15:10 +00:00
|
|
|
}
|
2012-03-26 02:05:14 +00:00
|
|
|
killme();
|
|
|
|
}
|