You are here

function media_vimeo_variable_default in Media: Vimeo 7

Same name and namespace in other branches
  1. 6 includes/media_vimeo.variables.inc \media_vimeo_variable_default()

The default variables within the Media: Vimeo namespace.

Parameters

string $name: Optional variable name to retrieve the default. Note that it has not yet been pre-pended with the MEDIA_VIMEO_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_vimeo_variable_get()

media_vimeo_variable_set()

media_vimeo_variable_del()

2 calls to media_vimeo_variable_default()
media_vimeo_uninstall in ./media_vimeo.install
Implement hook_uninstall().
media_vimeo_variable_get in includes/media_vimeo.variables.inc
Wrapper for variable_get() using the Media: Vimeo variable registry.

File

includes/media_vimeo.variables.inc, line 99
media_vimeo/includes/media_vimeo.variables.inc Variable defaults for Media: Vimeo.

Code

function media_vimeo_variable_default($name = NULL) {
  static $defaults;
  if (!isset($defaults)) {
    $defaults = array(
      'width' => 640,
      'height' => 360,
      'preview_uri' => 'vimeo://v/21869117',
      'api' => 0,
      'autoplay' => 0,
      'byline' => 1,
      'color' => NULL,
      'loop' => 0,
      'portrait' => 1,
      'title' => 1,
      'protocol' => 'http://',
    );
  }
  if (!isset($name)) {
    return $defaults;
  }
  if (isset($defaults[$name])) {
    return $defaults[$name];
  }
}