You are here

function simple_sitemap_update_8217 in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x simple_sitemap.install \simple_sitemap_update_8217()

Adding per-variant custom link configuration.

File

./simple_sitemap.install, line 684
Module install and update procedures.

Code

function simple_sitemap_update_8217() {
  $config_factory = \Drupal::service('config.factory');
  $old_config = $config_factory
    ->getEditable('simple_sitemap.custom');
  $config_factory
    ->getEditable('simple_sitemap.custom_links.' . _simple_sitemap_update_8216_get_default_variant())
    ->setData($old_config
    ->get())
    ->save();
  $old_config
    ->delete();
  return t('The XML sitemaps need to be regenerated.');
}