You are here

function media_vimeo_variable_default in Media: Vimeo 6

Same name and namespace in other branches
  1. 7 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()

3 calls to media_vimeo_variable_default()
media_vimeo_uninstall in ./media_vimeo.install
Implementation of hook_uninstall().
media_vimeo_variable_get in includes/media_vimeo.variables.inc
Wrapper for variable_get() that uses the Media: Vimeo variable registry.
_media_vimeo_migrate_variable in ./media_vimeo.install
Migrate a variable from the old namespace.

File

includes/media_vimeo.variables.inc, line 117
media_vimeo/includes/media_vimeo.variables.inc Contains the variables and defaults used by Media: Vimeo.

Code

function media_vimeo_variable_default($name = NULL) {
  static $defaults;
  if (!isset($defaults)) {
    $defaults = array(
      'color_override' => FALSE,
      'color' => MEDIA_VIMEO_COLOR_DEFAULT,
      'on_screen_info' => array(
        'portrait',
        'title',
        'byline',
      ),
      'full_screen' => 1,
      'api_key' => '',
      'api_secret' => '',
      'thumb_size' => '160',
      'default_width' => 400,
      'default_height' => 227,
      'universal' => TRUE,
    );
  }
  if (!isset($name)) {
    return $defaults;
  }
  if (isset($defaults[$name])) {
    return $defaults[$name];
  }
}