function admin_theme_admin_theme_options in Administration theme 5
Same name and namespace in other branches
- 6 admin_theme.module \admin_theme_admin_theme_options()
Implementation of hook_admin_theme().
1 call to admin_theme_admin_theme_options()
- admin_theme_uninstall in ./
admin_theme.install - Implementation of hook_uninstall().
File
- ./
admin_theme.module, line 174 - Enable the administration theme on more pages then possible with Drupal's default administration page.
Code
function admin_theme_admin_theme_options($op = 'info', $option = NULL) {
switch ($op) {
case 'info':
$options = array();
$options['node'] = array(
'title' => t('Content editing'),
'description' => t('Use the administration theme when editing existing posts or creating new ones.'),
);
if (module_exists('img_assist')) {
$options['img_assist'] = array(
'title' => t('Image assist'),
'description' => t('Use the administration theme when viewing the Image assist popup window.'),
);
}
if (module_exists('coder')) {
$options['coder'] = array(
'title' => t('Code reviews'),
'description' => t('Use the administration theme when viewing Coder code reviews.'),
);
}
if (module_exists('devel')) {
$options['devel'] = array(
'title' => t('Devel pages'),
'description' => t('Use the administration theme when viewing pages of the devel module (hook_elements(), Dev render, Dev load, Session viewer, Theme registery, Variable editor, ...).'),
);
}
if (module_exists('webform')) {
$options['webform_results'] = array(
'title' => t('Webform submissions.'),
'description' => t('Use the administration theme when viewing webform submissions.'),
);
}
if (module_exists('statistics')) {
$options['statistics'] = array(
'title' => t('Statistics pages'),
'description' => t('Use the administration theme when viewing pages of the statistics module.'),
);
}
return $options;
case 'check':
switch ($option) {
case 'node':
return arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit');
case 'img_assist':
return arg(0) == 'img_assist';
case 'coder':
return arg(0) == 'coder';
case 'devel':
return arg(0) == 'devel' || arg(0) == 'node' && arg(2) == 'devel';
case 'webform_results':
return arg(0) == 'node' && arg(2) == 'results';
case 'statistics':
return (arg(0) == 'node' || arg(0) == 'user') && arg(2) == 'track';
}
}
}