function sharemessage_update_8001 in Share Message 8
Update override default settings and set the AddThis plugin.
File
- ./
sharemessage.install, line 13 - Update function for the Share Message module.
Code
function sharemessage_update_8001() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('sharemessage.sharemessage') as $name) {
$config = $config_factory
->getEditable($name);
$override_default_settings = $config
->get('override_default_settings');
$config
->clear('override_default_settings');
$config
->set('settings.override_default_settings', $override_default_settings);
$config
->set('plugin', 'addthis');
$config
->save();
}
$config_factory
->rename('sharemessage.settings', 'sharemessage.addthis');
}