You are here

function image_field_caption_settings in Image Field Caption 7

The module's settings form.

1 string reference to 'image_field_caption_settings'
image_field_caption_menu in ./image_field_caption.module
Implements hook_menu().

File

./image_field_caption.module, line 57
Provides a caption textarea for image fields.

Code

function image_field_caption_settings() {

  // Create the form.
  $form = array();

  // Add the README and Project Homepage links to the form prefix.
  $readme_url = drupal_get_path('module', 'image_field_caption') . '/README.txt';
  $items = array(
    l('README', $readme_url),
    l('Project Homepage', 'http://www.tylerfrankenstein.com/image_field_caption'),
  );
  $form['#prefix'] = theme('item_list', array(
    'items' => $items,
  ));

  // Add the allowed tags field.
  $form['image_field_caption_allowed_tags'] = array(
    '#title' => 'Allowed Tags',
    '#type' => 'textfield',
    '#description' => t('Enter the html tags allowed in image field captions, separated by comma.
        All caption input is ran through filter_xss() before being output.') . ' ' . l('More Information', 'http://api.drupal.org/api/drupal/includes%21common.inc/function/filter_xss/7'),
    '#default_value' => image_field_captions_allowed_tags(),
  );
  return system_settings_form($form);
}