2012-03-25 22:05:14 -04:00
|
|
|
<?php
|
|
|
|
|
2016-02-05 15:52:39 -05:00
|
|
|
if(! function_exists('pretheme_init')) {
|
2012-03-25 22:05:14 -04:00
|
|
|
function pretheme_init(&$a) {
|
2016-02-05 15:52:39 -05:00
|
|
|
|
2012-03-26 21:15:10 -04: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-23 22:37:00 -04:00
|
|
|
$desc = $info['description'];
|
|
|
|
$version = $info['version'];
|
|
|
|
$credits = $info['credits'];
|
2012-03-26 21:15:10 -04:00
|
|
|
}
|
2012-07-23 22:37:00 -04:00
|
|
|
else {
|
|
|
|
$desc = '';
|
|
|
|
$version = '';
|
|
|
|
$credits = '';
|
|
|
|
}
|
|
|
|
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
|
2012-03-26 21:15:10 -04:00
|
|
|
}
|
2012-03-25 22:05:14 -04:00
|
|
|
killme();
|
|
|
|
}
|
2016-02-05 15:52:39 -05:00
|
|
|
}
|