You are here

widgets.admin.inc in Widgets 6

Same filename and directory in other branches
  1. 7 widgets.admin.inc

Implementaion of admin functions for Widgets module.

File

widgets.admin.inc
View source
<?php

/**
 * @file
 * Implementaion of admin functions for Widgets module.
 */

/**
 * Widgets settings form.
 */
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);
}

Functions

Namesort descending Description
widgets_settings Widgets settings form.