Skip to content
Snippets Groups Projects

Issue #2545108 by bluegeek9: D7 Allow custom theme for /visitors path

Merged Steven Ayers requested to merge issue/visitors-2545108:2545108-72-custom-theme into 7.x-2.x
2 files
+ 42
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 16
1
@@ -151,6 +151,21 @@ function visitors_admin_settings() {
@@ -151,6 +151,21 @@ function visitors_admin_settings() {
'#description' => t('Chart height.')
'#description' => t('Chart height.')
);
);
 
$installed = array_filter(list_themes(), function ($obj) {
 
return $obj->status;
 
});
 
 
$themes = array('_admin' => t('admin'), '_default' => t('default')) + array_map(function ($value) {
 
return $value->name;
 
}, $installed);
 
 
$form['visitors_theme'] = array(
 
'#title' => t('Theme'),
 
'#description' => t('Select a theme for the Visitors reports.'),
 
'#type' => 'select',
 
'#options' => $themes,
 
'#default_value' => variable_get('visitors_theme', '_admin'),
 
);
 
return system_settings_form($form);
return system_settings_form($form);
}
}
Loading