function theme_flowplayer in Flowplayer API 6
Same name and namespace in other branches
- 5 flowplayer.module \theme_flowplayer()
- 7.2 flowplayer.module \theme_flowplayer()
- 7 flowplayer.module \theme_flowplayer()
Creates the markup and adds the JavaScript to display a media file in
Parameters
$config: (optional) Can either be a string representing the media to load, or an array of arguments containing the options provided on this page: http://flowplayer.org/documentation/configuration.html
$id: (optional) The ID of the DIV element to use.
$attributes: (optional) Any additional attributes to associate with the DIV.
$contents: (optional) The contents that will appear within the Flowplayer div. For more information about what you can do with this, visit the splash support examples: http://flowplayer.org/demos/skinning/splash-info.html
2 theme calls to theme_flowplayer()
- flowplayer_admin_settings in ./
flowplayer.admin.inc - Administration settings for the Flowplayer Drupal module.
- flowplayer_help in ./
flowplayer.module - Implementation of hook_help().
File
- ./
flowplayer.module, line 218 - Provides integration with FlowPlayer.
Code
function theme_flowplayer($config = NULL, $id = 'flowplayer', $attributes = array(), $contents = '') {
// Prepare the ID.
$id = form_clean_id($id);
// Prepare the attributes, passing in the flowplayer class.
if (isset($attributes['class'])) {
$attributes['class'] .= ' flowplayer';
}
else {
$attributes['class'] = 'flowplayer';
}
$attributes = drupal_attributes($attributes);
// Add the JavaScript to handle the element.
flowplayer_add('#' . $id, $config);
// Return the markup.
return "<div id='{$id}' {$attributes}>{$contents}</div>";
}