You are here

function fences_admin_settings_form in Fences 7.2

Same name and namespace in other branches
  1. 7 fences.admin.inc \fences_admin_settings_form()

Menu callback: admin settings form.

Return value

The settings form used by Menu block.

1 string reference to 'fences_admin_settings_form'
fences_menu in ./fences.module
Implements hook_menu().

File

./fences.admin.inc, line 326
Functions only needed on configuration pages.

Code

function fences_admin_settings_form($form, &$form_state) {
  $form['fences_default_markup'] = array(
    '#type' => 'radios',
    '#title' => t('Default “div” markup for unconfigured fields'),
    '#default_value' => variable_get('fences_default_markup', 0),
    '#options' => array(
      0 => t('Use the default wrapper markup from Drupal (nested <code>div</code>s).'),
      1 => t('Override the default wrapper markup with Fences’ lean markup (single <code>div</code> wrapper).'),
    ),
    '#description' => t('Drupal’s default field markup will be used by any field that has <em>not</em> been configured while Fences is enabled. Use this option to override the default markup for all unconfigured fields.'),
  );
  $form['fences_default_classes'] = array(
    '#type' => 'radios',
    '#title' => t('Default classes'),
    '#default_value' => variable_get('fences_default_classes', 0),
    '#options' => array(
      0 => t('Use Drupal’s default classes (<code>field</code>, <code>field-name-field-NAME</code>, <code>field-type-TYPE</code>, <code>field-label-LABELTYPE</code>, <code>clearfix</code>, <code>field-item</code>, <code>odd</code>, <code>even</code>).'),
      1 => t('Override the default classes with Fences’ single <code>field-NAME</code> class.'),
    ),
    '#description' => t('Drupal’s default classes are verbose and most are useless, but some themes may require them.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  return $form;
}