You are here

function emaudio_embed_form in Embedded Media Field 5

Same name and namespace in other branches
  1. 6.3 contrib/emaudio/emaudio.module \emaudio_embed_form()
  2. 6 contrib/emaudio/emaudio.module \emaudio_embed_form()
  3. 6.2 contrib/emaudio/emaudio.module \emaudio_embed_form()
1 string reference to 'emaudio_embed_form'
theme_emaudio_emaudio_embed in contrib/emaudio/emaudio.module

File

contrib/emaudio/emaudio.module, line 291

Code

function emaudio_embed_form($field, $item, $formatter, $node, $options = array()) {
  $embed = $item['value'];
  $width = $field['widget']['audio_width'];
  $height = $field['widget']['audio_height'];
  $autoplay = $field['widget']['audio_autoplay'];
  $text = module_invoke('emfield', 'include_invoke', 'emaudio', $item['provider'], 'audio', $embed, $width, $height, $field, $item, $autoplay, $node, $options);
  $form = array();
  $form['emaudio_embed'] = array(
    '#type' => 'textarea',
    '#title' => t('Embed Code'),
    '#description' => t('To embed this audio on your own site, simply copy and paste the html code from this text area.'),
    '#default_value' => $text,
  );
  return $form;
}