You are here

function emapi_variable_default in Embedded Media Field 6.3

The default variables within the Embedded Media API namespace.

Parameters

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

emapi_variable_get()

emapi_variable_set()

emapi_variable_del()

2 calls to emapi_variable_default()
emapi_uninstall in emapi/emapi.install
Implementation of hook_uninstall().
emapi_variable_get in emapi/includes/emapi.variables.inc
Wrapper for variable_get() using the Embedded Media API variable registry.

File

emapi/includes/emapi.variables.inc, line 101
Contains the variables and defaults used by Embedded Media API.

Code

function emapi_variable_default($name = NULL) {
  static $defaults;
  if (!isset($defaults)) {
    $defaults = array(
      'class_emapimedia_description' => 'Base Embedded Media Object, to be extended by individual providers.',
      'cache_expire' => 3600,
      'admin_pager_query' => 50,
    );
  }
  if (!isset($name)) {
    return $defaults;
  }
  if (isset($defaults[$name])) {
    return $defaults[$name];
  }
}