Same name and namespace in other branches
  1. 5.x modules/filter/filter.module \_filter_url_settings()
  2. 6.x modules/filter/filter.module \_filter_url_settings()

Implements callback_filter_settings().

Provides settings for the URL filter.

See also

filter_filter_info()

Related topics

1 string reference to '_filter_url_settings'
filter_filter_info in modules/filter/filter.module
Implements hook_filter_info().

File

modules/filter/filter.module, line 1430
Framework for handling the filtering of content.

Code

function _filter_url_settings($form, &$form_state, $filter, $format, $defaults) {
  $filter->settings += $defaults;
  $settings['filter_url_length'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum link text length'),
    '#default_value' => $filter->settings['filter_url_length'],
    '#size' => 5,
    '#maxlength' => 4,
    '#field_suffix' => t('characters'),
    '#description' => t('URLs longer than this number of characters will be truncated to prevent long strings that break formatting. The link itself will be retained; just the text portion of the link will be truncated.'),
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
  );
  return $settings;
}