function _filter_url_settings
Implements callback_filter_settings().
Provides settings for the URL filter.
See also
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
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.