You are here

xmlsitemap_node.install in XML sitemap 7.2

Install and uninstall schema and functions for the xmlsitemap_node module.

File

xmlsitemap_node/xmlsitemap_node.install
View source
<?php

/**
 * @file
 * Install and uninstall schema and functions for the xmlsitemap_node module.
 */

/**
 * Implements hook_uninstall().
 */
function xmlsitemap_node_uninstall() {
  drupal_load('module', 'node');
  drupal_load('module', 'xmlsitemap');
  $node_types = array_keys(node_type_get_names());
  foreach ($node_types as $node_type) {
    xmlsitemap_link_bundle_delete('node', $node_type);
  }
}

/**
 * Cleanup variables.
 */
function xmlsitemap_node_update_6200() {
  drupal_load('module', 'node');
  drupal_load('module', 'xmlsitemap');
  $node_types = array_keys(node_type_get_names());
  foreach ($node_types as $node_type) {
    $settings = array(
      'status' => variable_get('xmlsitemap_node_status_' . $node_type, XMLSITEMAP_STATUS_DEFAULT),
      'priority' => variable_get('xmlsitemap_node_priority_' . $node_type, XMLSITEMAP_PRIORITY_DEFAULT),
    );
    variable_set('xmlsitemap_settings_node_' . $node_type, $settings);
    variable_del('xmlsitemap_node_status_' . $node_type);
    variable_del('xmlsitemap_node_priority_' . $node_type);
    variable_del('xmlsitemap_node_update_' . $node_type);
  }
  return array();
}

/**
 * Empty update.
 */
function xmlsitemap_node_update_6201() {
}

Functions

Namesort descending Description
xmlsitemap_node_uninstall Implements hook_uninstall().
xmlsitemap_node_update_6200 Cleanup variables.
xmlsitemap_node_update_6201 Empty update.