function flowplayer3_get_palette in SWF Tools 6.2
Helper function to retrieve the color palette for a particular style.
Parameters
$default: Optional parameter (default false). If false or omitted returns the current palette, if true returns the default palette.
Return value
An array of key/value pairs - the key defines the componenent and the value defines the color.
1 call to flowplayer3_get_palette()
- flowplayer3_scheme_form in flowplayer3/
flowplayer3.admin.inc - Helper function to produce the color scheme form for the flowplayer
File
- flowplayer3/
flowplayer3.admin.inc, line 454
Code
function flowplayer3_get_palette($default = false) {
// Define palette properties
$fields = array(
'backgroundColor',
'controlbarbackgroundColor',
'timeColor',
'durationColor',
'progressColor',
'bufferColor',
'sliderColor',
'buttonColor',
'buttonOverColor',
);
// Get the theme information
$info = flowplayer3_get_info();
// Get the keys (strings of colors) from the available schemes
$keys = array_keys($info['schemes']);
// Exploded the first (default) string in an array
foreach (explode(',', array_shift($keys)) as $k => $scheme) {
// Build a palette
$palette[$fields[$k]] = $scheme;
}
// If default is required, return it, otherwise load palette variable
return $default ? $palette : variable_get('flowplayer3_palette', $palette);
}