You are here

function simplify_get_admin_settings_array in Simplify 7.2

Array builder. Simplify admin settings.

1 call to simplify_get_admin_settings_array()
simplify_admin_settings in ./simplify.module
Form builder. Simplify admin settings.

File

./simplify.module, line 131
Simplifies the admin interface.

Code

function simplify_get_admin_settings_array(&$form, $node_type) {
  $node_type_type = $node_type['type'];
  $node_type_name = $node_type['name'];
  $form['simplify'][$node_type_type] = array(
    '#type' => 'fieldset',
    '#title' => t($node_type_name),
    '#description' => '<p>' . t("Checked settings apply to {$node_type_name} nodes.") . '</p>',
  );
  $simplify_node_type = $node_type_type == 'node' ? '' : '_' . $node_type_type;
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_filter'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide text format settings'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_filter'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_menu'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide menu settings'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_menu'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_revision_information'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide revision information'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_revision_information'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_path'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide path settings'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_path'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_comment_settings'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide comment settings'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_comment_settings'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_author'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide author information'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_author'),
  );
  $form['simplify'][$node_type_type]['simplify' . $simplify_node_type . '_node_hide_options'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide publishing options'),
    '#default_value' => variable_get('simplify' . $simplify_node_type . '_node_hide_options'),
  );
}