';
echo '
Photon Options
';
photon_options_form ();
echo '';
}
function photon_update_options () {
$updated = false;
if ($_REQUEST ['stylesheet']) {
update_option ('photon_custom_stylesheet_name', $_REQUEST ['stylesheet']);
$updated = true;
}
if ($updated) {
echo '';
echo '
Options updated
';
echo '
';
}
}
function photon_options_form () {
$files = photon_get_custom_styles ();
$currentname = get_option ('photon_custom_stylesheet_name');
echo '' . "\n\n";
}
function photon_get_custom_styles () {
$dir = '../wp-content/themes/photon/styles';
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file=readdir($dh)) != false) {
if($file[0] == '.')
continue;
$files[] = $file;
}
closedir($dh);
}
}
return $files;
}
?>