function theme_video_filter_flash in Video Filter 7.3
Same name and namespace in other branches
- 5.2 video_filter.module \theme_video_filter_flash()
- 6.3 video_filter.module \theme_video_filter_flash()
- 6.2 video_filter.module \theme_video_filter_flash()
Function that outputs the <object> element.
1 theme call to theme_video_filter_flash()
- video_filter_flash in ./
video_filter.module - Wrapper that calls the theme function.
File
- ./
video_filter.module, line 357
Code
function theme_video_filter_flash($variables) {
$output = '';
$video = $variables['video'];
$params = isset($variables['params']) ? $variables['params'] : array();
$classes = video_filter_get_classes($video);
$attributes = '';
if (!empty($video['attributes'])) {
$attributes = drupal_attributes($video['attributes']);
}
$output .= '<div class="video-filter"><object class="' . implode(' ', $classes) . '" type="application/x-shockwave-flash" ';
$output .= 'width="' . $video['width'] . '" height="' . $video['height'] . '" data="' . $video['source'] . '" ' . $attributes . '>' . "\n";
$defaults = array(
'movie' => $video['source'],
'wmode' => 'transparent',
'allowFullScreen' => 'true',
);
$params = array_merge($defaults, is_array($params) && count($params) ? $params : array());
foreach ($params as $name => $value) {
$output .= ' <param name="' . $name . '" value="' . $value . '" />' . "\n";
}
$output .= '</object></div>' . "\n";
return $output;
}