You are here

function domain_theme_domain_form in Domain Access 7.3

Implements hook_domain_form()

File

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

Code

function domain_theme_domain_form(&$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.'),
  );
}