function skinr_import_form in Skinr 6
Skinr settings import form.
1 string reference to 'skinr_import_form'
- skinr_menu in ./
skinr.module - Implementation of hook_menu().
File
- ./
skinr.admin.inc, line 95
Code
function skinr_import_form(&$form_state) {
$form = array();
$options = array();
$themes = list_themes();
ksort($themes);
$current_theme = skinr_current_theme();
// Put default theme at the top.
$options[$current_theme] = $themes[$current_theme]->info['name'] . ' [' . t('default') . ']';
foreach ($themes as $theme) {
if ($theme->name == $current_theme) {
// Do nothing.
}
elseif ($theme->status) {
$options[$theme->name] = $theme->info['name'] . ' [' . t('enabled') . ']';
}
else {
$options[$theme->name] = $theme->info['name'];
}
}
$form['theme'] = array(
'#type' => 'select',
'#title' => t('Theme'),
'#options' => $options,
'#required' => TRUE,
);
$form['skinr_settings'] = array(
'#type' => 'textarea',
'#title' => t('Skinr settings'),
'#description' => t('Paste skinr settings here.'),
'#rows' => 16,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
);
return $form;
}