1 translation.install | translation_update_1002() |
Add "Show content translation links" setting to each content type.
Related topics
File
- core/
modules/ translation/ translation.install, line 68 - Install, update and uninstall functions for the Translation module.
Code
function translation_update_1002() {
$types = config_get_names_with_prefix('node.type.');
foreach ($types as $config_name) {
$config = config($config_name);
if ($config->get('settings.translation_show_links') === NULL) {
$config->set('settings.translation_show_links', TRUE);
$config->save();
}
}
}