Skip to content
Snippets Groups Projects

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

Merged Steven Ayers requested to merge issue/visitors-2545108:2545108-custom-theme into 7.x-1.x
2 files
+ 43
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 16
0
@@ -170,5 +170,21 @@ function visitors_admin_settings() {
'#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);
}
Loading