function swftools_push_js in SWF Tools 6.2
Same name and namespace in other branches
- 5 swftools.module \swftools_push_js()
- 6 swftools.module \swftools_push_js()
Add to the page any supporting files required by a given embedding method.
Parameters
$embed: Optional parameter - if not supplied the files for the current method will be added. If supplied then the files for the named method will be added.
Return value
Nothing
1 call to swftools_push_js()
- swftools_init in ./
swftools.module - Implementation of hook_init() swftools_init() is used to force embedding JavaScript on to all pages
File
- ./
swftools.module, line 989
Code
function swftools_push_js($embed = SWFDEFAULT) {
// Get the the currently available methods
$all_methods = swftools_methods_available();
// If no specific embedding method was named then get the current default
if (!$embed) {
$embed = variable_get(SWFTOOLS_EMBED_METHOD, SWFTOOLS_NOJAVASCRIPT);
}
// Call the module responsible to output the js. Don't pass any additional
// parameters - as we don't want the module to try and return the in-body
// html placeholder for the flash content.
$output = module_invoke($all_methods[SWFTOOLS_EMBED_METHOD][$embed]['module'], 'swftools_embed');
}