You are here

function xmlsitemap_taxonomy_update_6200 in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap_taxonomy/xmlsitemap_taxonomy.install \xmlsitemap_taxonomy_update_6200()

Cleanup variables.

File

xmlsitemap_taxonomy/xmlsitemap_taxonomy.install, line 92
Install and uninstall schema and functions for the xmlsitemap_taxonomy module.

Code

function xmlsitemap_taxonomy_update_6200() {
  drupal_load('module', 'taxonomy');
  drupal_load('module', 'xmlsitemap');
  $vids = array_keys(taxonomy_get_vocabularies());
  foreach ($vids as $vid) {
    $settings = array(
      'status' => variable_get('xmlsitemap_taxonomy_status_' . $vid, XMLSITEMAP_STATUS_DEFAULT),
      'priority' => variable_get('xmlsitemap_taxonomy_priority_' . $vid, XMLSITEMAP_PRIORITY_DEFAULT),
    );
    variable_set('xmlsitemap_settings_taxonomy_term_' . $vid, $settings);
    variable_del('xmlsitemap_taxonomy_status_' . $vid);
    variable_del('xmlsitemap_taxonomy_priority_' . $vid);
    variable_del('xmlsitemap_taxonomy_calculate_priority_' . $vid);
    variable_del('xmlsitemap_taxonomy_include_empty_terms_' . $vid);
  }
  variable_del('xmlsitemap_taxonomy_include_empty_terms');
  variable_del('xmlsitemap_taxonomy_calculate_priority');
  return array();
}