You are here

function sitemap_update_8102 in Sitemap 2.0.x

Same name and namespace in other branches
  1. 8.2 sitemap.install \sitemap_update_8102()
  2. 8 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 26
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();
}