You are here

function widgets_settings in Widgets 6

Widgets settings form.

1 string reference to 'widgets_settings'
widgets_menu in ./widgets.module
Implementation of hook_menu().

File

./widgets.admin.inc, line 10
Implementaion of admin functions for Widgets module.

Code

function widgets_settings() {

  // Get node types.
  $types = node_get_types();
  $available_types = array();
  foreach ($types as $type) {
    $available_types[$type->type] = $type->name;
  }
  $form['widgets_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Widget node types'),
    '#default_value' => variable_get('widgets_types', array()),
    '#options' => $available_types,
    '#description' => t('Check the node types you want to enable as <em>widget types</em>.'),
  );
  return system_settings_form($form);
}