You are here

function admin_theme_admin_theme_options in Administration theme 6

Same name and namespace in other branches
  1. 5 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['batch'] = array(
        'title' => t('Batch processing'),
        'description' => t('Use the administration theme when executing batch operations.'),
      );
      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('service_attachments')) {
        $options['service_attachments'] = array(
          'title' => t('Service attachments form on nodes'),
          'description' => t('Use the administration theme when viewing service attachments on nodes.'),
        );
      }
      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 '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 'batch':
          return arg(0) == 'batch';
        case 'service_attachments':
          return arg(0) == 'node' && arg(2) == 'service_attachments';
        case 'webform_results':
          return arg(0) == 'node' && arg(2) == 'webform-results';
        case 'statistics':
          return (arg(0) == 'node' || arg(0) == 'user') && arg(2) == 'track';
      }
  }
}