function _swftools_wpaudio_flashvars in SWF Tools 6.3
Retrieves the audio player default settings and unsets any that are empty.
Return value
An array of settings.
1 call to _swftools_wpaudio_flashvars()
- swftools_wpaudio_swftools_preprocess_wpaudio in wpaudio/
swftools_wpaudio.module - Implementation of hook_swftools_preprocess_[player]().
File
- wpaudio/
swftools_wpaudio.module, line 173 - Enables SWF Tools support for the WordPress Audio player.
Code
function _swftools_wpaudio_flashvars($profile) {
// Initialise cache to handle repeated calls
static $cache = array();
// Store name of profile
$_profile = $profile;
if ($profile === '') {
$_profile = '__default';
}
// If no settings stored for this profile then fetch them
if (!isset($cache[$_profile])) {
// Get default/saved settings
$settings = _swftools_wpaudio_settings($profile);
// Flatten
swftools_array_flatten($settings);
// Filter out unassigned or default entries
$settings = array_diff($settings, array(
'',
'default',
));
// Store the result
$cache[$_profile] = $settings;
}
// Return the settings
return $cache[$_profile];
}