function media_soundcloud_variable_default in Media: SoundCloud 7
The default variables within the Media: SoundCloud namespace.
Parameters
string $name: Optional variable name to retrieve the default. Note that it has not yet been pre-pended with the MEDIA_SOUNDCLOUD_NAMESPACE namespace at this time.
Return value
unknown The default value of this variable, if it's been set, or NULL, unless $name is NULL, in which case we return an array of all default values.
See also
media_soundcloud_variable_get()
media_soundcloud_variable_set()
media_soundcloud_variable_del()
2 calls to media_soundcloud_variable_default()
- media_soundcloud_uninstall in ./
media_soundcloud.install  - Implement hook_uninstall().
 - media_soundcloud_variable_get in includes/
media_soundcloud.variables.inc  - Wrapper for variable_get() using the Media: SoundCloud variable registry.
 
File
- includes/
media_soundcloud.variables.inc, line 99  - media_soundcloud/includes/media_soundcloud.variables.inc Variable defaults for Media: SoundCloud.
 
Code
function media_soundcloud_variable_default($name = NULL) {
  static $defaults;
  if (!isset($defaults)) {
    $defaults = array(
      'width' => "100%",
      'autoplay' => FALSE,
      'extra_params' => "",
      'preview_uri' => 'soundcloud://u/djandrewz/a/hope-one',
    );
  }
  if (!isset($name)) {
    return $defaults;
  }
  if (isset($defaults[$name])) {
    return $defaults[$name];
  }
}