You are here

function lingotek_set_defaults in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_set_defaults()
  2. 7.2 lingotek.util.inc \lingotek_set_defaults()
  3. 7.3 lingotek.util.inc \lingotek_set_defaults()
  4. 7.4 lingotek.util.inc \lingotek_set_defaults()
  5. 7.6 lingotek.util.inc \lingotek_set_defaults()

Sets the global defaults for the Lingotek Translation module

1 call to lingotek_set_defaults()
lingotek_enable in ./lingotek.install
Implements hook_enable().

File

./lingotek.util.inc, line 1088
Utility functions.

Code

function lingotek_set_defaults() {
  LingotekLog::trace(__METHOD__);
  $defaults = array(
    'lingotek_advanced_parsing' => TRUE,
  );

  // Check if vars are set.  If so, use what is already set.  If not, set them using the defaults provided above.
  foreach ($defaults as $k => $default_value) {
    variable_set($k, variable_get($k, $default_value));
  }
  lingotek_set_default_advanced_xml();
}