function _wijering4_flashvars in SWF Tools 5
Same name and namespace in other branches
- 6 wijering4/wijering4.module \_wijering4_flashvars()
- 6.2 wijering4/wijering4.module \_wijering4_flashvars()
This function is called from wijering4_swftools_flashvars() which is called from swf() It will return the default flashvar configuration, just prior to any overrides passed into swf(). We start with the settings defined on admin/swf/wijering which are returned by _wijering4_settings(). Then we prepare these values for output to html (eg. '1' become 'true') and we unset undefined flashvars to prevent their output.
1 call to _wijering4_flashvars()
- wijering4_swftools_flashvars in wijering4/
wijering4.module - Implementation of swftools_flashvars hook. Return an array of flashvars.
File
- wijering4/
wijering4.module, line 172
Code
function _wijering4_flashvars($this_player) {
// Cache this.
static $flashvars = array();
if (!count($flashvars)) {
// Media Player
foreach (array(
WIJERING4_MEDIAPLAYER,
) as $player) {
// Get saved settings for this method.
$defaults = _wijering4_settings($player);
foreach ($defaults as $category => $vars) {
foreach ($vars as $key => $setting) {
if ($setting == '' || $setting == 'default') {
unset($defaults[$category][$key]);
}
else {
switch ($category) {
case 'color':
$defaults['color'][$key] = str_replace('#', '0x', $defaults['color'][$key]);
break;
case 'boolean':
$defaults['boolean'][$key] = _swftools_tf($defaults['boolean'][$key]);
break;
}
}
}
}
// Not the same as width/height. This determines the extended width OR height
// past the main view area where the actual playlist file names can be found.
// Setting both together is not supported.
if ($defaults['integer']['displaywidth']) {
unset($defaults['integer']['displayheight']);
}
else {
unset($defaults['integer']['displaywidth']);
}
$flashvars[$player] = $defaults;
}
}
return $flashvars[$this_player];
}