You are here

function oembed_file_formatter_oembed_settings in oEmbed 8

Same name and namespace in other branches
  1. 7 oembed.module \oembed_file_formatter_oembed_settings()
  2. 7.0 oembed.module \oembed_file_formatter_oembed_settings()

Implements hook_file_formatter_FORMATTER_settings().

1 string reference to 'oembed_file_formatter_oembed_settings'
oembed_file_formatter_info in ./oembed.file.inc
Implements hook_file_formatter_info().

File

./oembed.module, line 364
Core functionality for oEmbed

Code

function oembed_file_formatter_oembed_settings($form, &$form_state, $settings) {
  $element = array();
  $element['width'] = array(
    '#title' => t('Width'),
    '#type' => 'textfield',
    '#default_value' => $settings['width'],
  );
  $element['height'] = array(
    '#title' => t('Height'),
    '#type' => 'textfield',
    '#default_value' => $settings['height'],
  );
  $element['wmode'] = array(
    '#title' => t('Flash window mode (wmode)'),
    '#type' => 'select',
    '#empty_option' => t('None (do not request a specific wmode from the provider)'),
    '#options' => drupal_map_assoc(array(
      'window',
      'transparent',
      'opaque',
      'direct',
      'gpu',
    )),
    '#description' => t('Controls layering, transparency, and playback performance of content rendered by the Flash player. For more information, view <a href="http://kb2.adobe.com/cps/127/tn_12701.html#main_Using_Window_Mode__wmode__values_">Adobe\'s documentation</a>.'),
    '#default_value' => $settings['wmode'],
  );
  return $element;
}