You are here

function theme_swfembed_embed in SWF Embed 7

Same name and namespace in other branches
  1. 6 swfembed.module \theme_swfembed_embed()

Insert the div for the object and prepare JavaScript.

Parameters

$swf_object: An SWFObject object.

1 theme call to theme_swfembed_embed()
SWFObject::render in ./swfembed.module
Render this flash object using the theme system.

File

./swfembed.module, line 50
The main file for swfembed.

Code

function theme_swfembed_embed($variables) {
  $swf_object = $variables['swf'];
  swfembed_add_js();
  $id = $swf_object
    ->getId();
  $settings['swfembed']['swf'][$id] = $swf_object
    ->toArray();
  drupal_add_js($settings, array(
    'type' => 'setting',
  ));
  return '<div id="' . $id . '">' . $swf_object
    ->getNoFlash() . '</div>';
}