function media_soundcloud_variable_get in Media: SoundCloud 7
Wrapper for variable_get() using the Media: SoundCloud variable registry.
Parameters
string $name: The variable name to retrieve. Note that it will be namespaced by pre-pending MEDIA_SOUNDCLOUD_NAMESPACE, as to avoid variable collisions with other modules.
unknown $default: An optional default variable to return if the variable hasn't been set yet. Note that within this module, all variables should already be set in the media_soundcloud_variable_default() function.
Return value
unknown Returns the stored variable or its default.
See also
media_soundcloud_variable_set()
media_soundcloud_variable_del()
media_soundcloud_variable_default()
5 calls to media_soundcloud_variable_get()
- media_soundcloud_file_default_displays in includes/
media_soundcloud.formatters.inc - Implements hook_file_default_displays().
- media_soundcloud_file_formatter_info in includes/
media_soundcloud.formatters.inc - Implements hook_file_formatter_info().
- media_soundcloud_preprocess_media_soundcloud_audio in includes/
themes/ media_soundcloud.theme.inc - Preprocess function for theme('media_soundcloud_audio').
- theme_media_soundcloud_embed in includes/
themes/ media_soundcloud.theme.inc - @todo: get this working
- theme_media_soundcloud_preview_style in includes/
themes/ media_soundcloud.theme.inc - Preview for Styles UI.
File
- includes/
media_soundcloud.variables.inc, line 35 - media_soundcloud/includes/media_soundcloud.variables.inc Variable defaults for Media: SoundCloud.
Code
function media_soundcloud_variable_get($name, $default = NULL) {
// Allow for an override of the default.
// Useful when a variable is required (like $path), but namespacing is still
// desired.
if (!isset($default)) {
$default = media_soundcloud_variable_default($name);
}
// Namespace all variables.
$variable_name = MEDIA_SOUNDCLOUD_NAMESPACE . $name;
return variable_get($variable_name, $default);
}