function lingotek_set_defaults in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_set_defaults()
- 7.2 lingotek.util.inc \lingotek_set_defaults()
- 7.3 lingotek.util.inc \lingotek_set_defaults()
- 7.5 lingotek.util.inc \lingotek_set_defaults()
- 7.6 lingotek.util.inc \lingotek_set_defaults()
Sets the global defaults for the Lingotek Translation module
2 calls to lingotek_set_defaults()
- lingotek_cleanup_utility in ./
lingotek.util.inc - Clean-up utility
- lingotek_enable in ./
lingotek.install - Implements hook_enable().
File
- ./
lingotek.util.inc, line 1186 - Utility functions.
Code
function lingotek_set_defaults() {
LingotekLog::trace(__METHOD__);
$defaults = array(
'lingotek_sync' => 1,
// auto-download
'lingotek_create_documents_by_default' => 1,
// auto-upload
'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();
}