You are here

function domain_theme_domainform in Domain Access 7.2

Same name and namespace in other branches
  1. 5 domain_theme/domain_theme.module \domain_theme_domainform()
  2. 6.2 domain_theme/domain_theme.module \domain_theme_domainform()

Implements hook_domainform()

File

domain_theme/domain_theme.module, line 162
Domain Theme module for the Domain Access module group.

Code

function domain_theme_domainform(&$form) {

  // Set the module weight for Domain Theme,
  $module_weight = variable_get('domain_theme_weight', 0);
  db_update('system')
    ->fields(array(
    'weight' => $module_weight,
  ))
    ->condition('name', 'domain_theme')
    ->condition('type', 'module')
    ->execute();

  // Add the form element to the main screen.
  $form['domain_theme'] = array(
    '#type' => 'fieldset',
    '#title' => t('Theme settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $options = drupal_map_assoc(array(
    -100,
    -25,
    -10,
    -5,
    -1,
    0,
    1,
    5,
    10,
    25,
    100,
  ));
  $form['domain_theme']['domain_theme_weight'] = array(
    '#type' => 'select',
    '#title' => t('Domain Theme execution order'),
    '#options' => $options,
    '#default_value' => $module_weight,
    '#description' => t('If you use other modules that allow custom user or group themes, you may experience conflicts
      with the Domain Theme module.  Use this setting to vary the execution order of the Domain Theme module.  Lower
      (negative) values will execute earlier in the Drupal page building process.'),
  );
}