diff --git a/video_filter.module b/video_filter.module index 5a05024..6eb0b72 100644 --- a/video_filter.module +++ b/video_filter.module @@ -282,16 +282,20 @@ function theme_video_filter_flash($variables) { $video = $variables['video']; $params = isset($variables['params']) ? $variables['params'] : array(); + // Allow adding classes. $classes = video_filter_get_classes($video); + array_merge($classes, empty($variables['classes']) ? array() : $variables['classes']); - $attributes = ''; - if (!empty($video['attributes'])) { - $attributes = drupal_attributes($video['attributes']); - } + $attributes_array = !empty($video['attributes']) ? $video['attributes'] : array( + 'height' => $video['height'], + 'width' => $video['width'], + ); - $output .= '
' . "\n"; + $output .= '
' . "\n"; $defaults = array( 'movie' => $video['source'], @@ -317,13 +321,19 @@ function theme_video_filter_flash($variables) { */ function theme_video_filter_iframe($variables) { $video = $variables['video']; + + // Allow adding classes. $classes = video_filter_get_classes($video); - $attributes = ''; - if (!empty($video['attributes'])) { - $attributes = drupal_attributes($video['attributes']); - } + array_merge($classes, empty($variables['classes']) ? array() : $variables['classes']); + + $attributes_array = !empty($video['attributes']) ? $video['attributes'] : array( + 'height' => $video['height'], + 'width' => $video['width'], + ); + + $attributes = drupal_attributes($attributes_array); - $output = '
'; + $output = '
'; return $output; }