function sitemap_update_8102 in Sitemap 8
Same name and namespace in other branches
- 8.2 sitemap.install \sitemap_update_8102()
- 2.0.x sitemap.install \sitemap_update_8102()
Update the CSS configuration setting to reflect the change in option wording (from negation to affirmation).
File
- ./
sitemap.install, line 24 - Installation functions for Sitemap module.
Code
function sitemap_update_8102(&$sandbox) {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('sitemap.settings');
if ($config
->get('css')) {
$css = $config
->get('css') == TRUE ? FALSE : TRUE;
$config
->set('css', $css);
}
$config
->save();
}