You are here

function soembed_filter_oembed_settings in Simple oEmbed 7

Implements hook_filter_FILTER_settings().

1 string reference to 'soembed_filter_oembed_settings'
soembed_filter_info in ./soembed.module
Implements hook_filter_info().

File

./soembed.module, line 58
Lets author embed rich media by inserting URL using oEmbed techonology.

Code

function soembed_filter_oembed_settings($form, &$form_state, $filter, $format, $defaults, $filters) {
  $filter->settings += $defaults;
  $settings = array();
  $settings['soembed_maxwidth'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum width of media embed'),
    '#default_value' => $filter->settings['soembed_maxwidth'],
    '#description' => t('Set the maximum width of an embedded media. The unit is in pixels, but only put a number in the textbox.'),
  );
  $settings['soembed_replace_inline'] = array(
    '#type' => 'checkbox',
    '#title' => t('Replace in-line URLs'),
    '#default_value' => $filter->settings['soembed_replace_inline'],
    '#description' => t('If this option is checked, the filter will recognize URLs even when they are not on their own lines.'),
  );
  return $settings;
}