aboutsummaryrefslogblamecommitdiffstats
path: root/mod/pretheme.php
blob: 0efa587d8ce3b8f01b54205d205a8f412a289bc3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

                             









                                                                                                
                 
<?php

function pretheme_init(&$a) {
	
	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();
}