function swftools_variable_get in SWF Tools 6.3
Returns a variable from the relevant profile, or the global settings, or the default values.
This is a custom handler to take care of the SWF Tools profile mechanism. If no profile name is given then it simply returns the requested variable, or the default if the variable is not set.
If a profile name is given then it will first try to retrive the profiled variable. If that fails it will try to return the global setting, and if that fails then it will return the default. In this way we cascade through the "most relevant" setting.
Parameters
string $name: The name of the variable to return.
mixed $default: The default value to use if this variable has never been set.
string $profile: (optional) The name of the profile to use.
Return value
mixed The value of the variable.
12 calls to swftools_variable_get()
- swftools_flowplayer3_get_palette in flowplayer3/
swftools_flowplayer3.admin.inc - Helper function to retrieve the color palette for a particular style.
- swftools_flowplayer3_scheme_form in flowplayer3/
swftools_flowplayer3.admin.inc - Helper function to produce the color scheme form for the flowplayer
- swftools_get_players in ./
swftools.module - Returns the default handlers, or customised handlers, for each action.
- _swftools_flexpaper_settings in flexpaper/
swftools_flexpaper.module - Returns the player default settings, or customised settings from the configuration page.
- _swftools_flowplayer3_settings in flowplayer3/
swftools_flowplayer3.module - Returns an array of default settings for the player.
File
- ./
swftools.module, line 1673 - The primary component of SWF Tools that enables comprehensive media handling.
Code
function swftools_variable_get($name, $default, $profile = '') {
if ($profile && ($ret = variable_get('swftools_' . $profile . '_' . $name, SWFTOOLS_UNDEFINED)) != SWFTOOLS_UNDEFINED) {
return $ret;
}
return variable_get($name, $default);
}