function theme_swftools_embed in SWF Tools 6.2
Same name and namespace in other branches
- 5 swftools.module \theme_swftools_embed()
- 6.3 includes/swftools.theme.inc \theme_swftools_embed()
- 6 swftools.module \theme_swftools_embed()
Produce finished markup ready for inserting on the page
Parameters
$embed_markup: The markup needed to add the swf content to the page
$action: The action that is being used, in case the themer wants it
$methods: The player and embedding methods being used, in case the themer wants it
$vars: The array of othervars, params and flashvars in case the themer wants it
$html_alt: The alternate HTML content, in case the themer wants it
Return value
An HTML string that generates the output
1 theme call to theme_swftools_embed()
- swf in ./
swftools.module - Return output, which might be embed markup, or pre-flash markup that includes the appropriate jQuery added to the <head>
File
- ./
swftools.module, line 547
Code
function theme_swftools_embed($embed_markup, $action, $methods, $vars, $html_alt) {
// Generate a css id if an id was supplied in $vars->othervars
$id = !empty($vars->othervars['id']) ? ' id="swf-' . $vars->othervars['id'] . '"' : '';
// Prepare an array of classes to include in the wrapper div
$classes[] = 'swftools-wrapper';
$classes[] = str_replace('_', '-', $methods->player['name']);
// If the user provided class data already then don't over-rule it
if (!empty($vars->othervars['class'])) {
$classes[] = $vars->othervars['class'];
}
// Return completed markup
return '<div' . $id . ' class="' . implode(' ', $classes) . '">' . $embed_markup . '</div>';
}