function admin_menu_theme_settings

nittany7 admin_menu.inc admin_menu_theme_settings()
cis7 admin_menu.inc admin_menu_theme_settings()
mooc7 admin_menu.inc admin_menu_theme_settings()

Form builder function for module settings.

2 string references to 'admin_menu_theme_settings'
admin_menu_form_alter in modules/contrib/admin_menu/admin_menu.module
Implements hook_form_alter().
admin_menu_menu in modules/contrib/admin_menu/admin_menu.module
Implements hook_menu().

File

modules/contrib/admin_menu/admin_menu.inc, line 616
Menu builder functions for Administration menu.

Code

function admin_menu_theme_settings() {
  $form['admin_menu_margin_top'] = array(
    '#type' => 'checkbox',
    '#title' => t('Adjust top margin'),
    '#default_value' => variable_get('admin_menu_margin_top', 1),
    '#description' => t('Shifts the site output down by approximately 20 pixels from the top of the viewport. If disabled, absolute- or fixed-positioned page elements may be covered by the administration menu.'),
  );
  $form['admin_menu_position_fixed'] = array(
    '#type' => 'checkbox',
    '#title' => t('Keep menu at top of page'),
    '#default_value' => variable_get('admin_menu_position_fixed', 1),
    '#description' => t('Displays the administration menu always at the top of the browser viewport (even when scrolling the page).'),
  );
  // @todo Re-confirm this with latest browser versions.
  $form['admin_menu_position_fixed']['#description'] .= '<br /><strong>' . t('In some browsers, this setting may result in a malformed page, an invisible cursor, non-selectable elements in forms, or other issues.') . '</strong>';

  $form['advanced'] = array(
    '#type' => 'vertical_tabs',
    '#title' => t('Advanced settings'),
  );

  $form['plugins'] = array(
    '#type' => 'fieldset',
    '#title' => t('Plugins'),
    '#group' => 'advanced',
  );
  $form['plugins']['admin_menu_components'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Enabled components'),
    '#options' => array(
      'admin_menu.icon' => t('Icon menu'),
      'admin_menu.menu' => t('Administration menu'),
      'admin_menu.search' => t('Search bar'),
      'admin_menu.users' => t('User counts'),
      'admin_menu.account' => t('Account links'),
    ),
  );
  $form['plugins']['admin_menu_components']['#default_value'] = array_keys(array_filter(variable_get('admin_menu_components', $form['plugins']['admin_menu_components']['#options'])));

  $process = element_info_property('checkboxes', '#process', array());
  $form['plugins']['admin_menu_components']['#process'] = array_merge(array('admin_menu_settings_process_components'), $process);
  $form['#attached']['js'][] = drupal_get_path('module', 'admin_menu') . '/admin_menu.admin.js';

  $form['tweaks'] = array(
    '#type' => 'fieldset',
    '#title' => t('System tweaks'),
    '#group' => 'advanced',
  );
  $form['tweaks']['admin_menu_tweak_modules'] = array(
    '#type' => 'checkbox',
    '#title' => t('Collapse module groups on the <a href="!modules-url">%modules</a> page', array(
      '%modules' => t('Modules'),
      '!modules-url' => url('admin/modules'),
    )),
    '#default_value' => variable_get('admin_menu_tweak_modules', 0),
  );
  if (module_exists('util')) {
    $form['tweaks']['admin_menu_tweak_modules']['#description'] .= '<br /><strong>' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . '</strong>';
  }
  $form['tweaks']['admin_menu_tweak_permissions'] = array(
    '#type' => 'checkbox',
    '#title' => t('Collapse module groups on the <a href="@permissions-url">%permissions</a> page', array(
      '%permissions' => t('Permissions'),
      '@permissions-url' => url('admin/people/permissions'),
    )),
    '#default_value' => variable_get('admin_menu_tweak_permissions', 0),
  );
  $form['tweaks']['admin_menu_tweak_tabs'] = array(
    '#type' => 'checkbox',
    '#title' => t('Move local tasks into menu'),
    '#default_value' => variable_get('admin_menu_tweak_tabs', 0),
    '#description' => t('Moves the tabs on all pages into the administration menu. Only possible for themes using the CSS classes <code>tabs primary</code> and <code>tabs secondary</code>.'),
  );

  $form['performance'] = array(
    '#type' => 'fieldset',
    '#title' => t('Performance'),
    '#group' => 'advanced',
  );
  $form['performance']['admin_menu_cache_client'] = array(
    '#type' => 'checkbox',
    '#title' => t('Cache menu in client-side browser'),
    '#default_value' => variable_get('admin_menu_cache_client', 1),
  );
  // Fetch all available modules manually, since module_list() only returns
  // currently enabled modules, which makes this setting pointless if developer
  // modules are currently disabled.
  $all_modules = array();
  $result = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' ORDER BY name ASC");
  foreach ($result as $module) {
    if (file_exists($module->filename)) {
      $info = unserialize($module->info);
      $all_modules[$module->name] = $info['name'];
    }
  }
  $devel_modules = variable_get('admin_menu_devel_modules', _admin_menu_developer_modules());
  $devel_modules = array_intersect_key($all_modules, array_flip($devel_modules));
  $form['performance']['admin_menu_devel_modules_skip'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Developer modules to keep enabled'),
    '#default_value' => variable_get('admin_menu_devel_modules_skip', array()),
    '#options' => $devel_modules,
    '#access' => !empty($devel_modules),
    '#description' => t('The selected modules will not be disabled when the link %disable-developer-modules below the icon in the menu is invoked.', array(
      '%disable-developer-modules' => t('Disable developer modules'),
    )),
  );

  return system_settings_form($form);
}