You are here

function page_title_uninstall in Page Title 6.2

Same name and namespace in other branches
  1. 8.2 page_title.install \page_title_uninstall()
  2. 5.2 page_title.install \page_title_uninstall()
  3. 5 page_title.install \page_title_uninstall()
  4. 6 page_title.install \page_title_uninstall()
  5. 7.2 page_title.install \page_title_uninstall()
  6. 7 page_title.install \page_title_uninstall()

Implementation of hook_uninstall().

File

./page_title.install, line 82
The install file for Page Title allows the module to install (and uninstall) itself. This is required as this module uses its own table.

Code

function page_title_uninstall() {
  drupal_uninstall_schema('page_title');

  // Clear variables
  variable_del('page_title_default');
  variable_del('page_title_individual');
  variable_del('page_title_front');
  variable_del('page_title_blog');
  variable_del('page_title_user');
  variable_del('page_title_user_showfield');
  variable_del('page_title_pager_pattern');
  variable_del('page_title_forum_root_title');
  variable_del('page_title_comment_reply');
  variable_del('page_title_comment_child_reply');

  // Clear the node specific variables
  $types = node_get_types('names');
  foreach ($types as $type => $name) {
    variable_del("page_title_type_{$type}");
    variable_del("page_title_type_{$type}_showfield");
  }

  // Clear the vocab specific variables
  if (module_exists('taxonomy')) {
    $vocabs = taxonomy_get_vocabularies();
    foreach ($vocabs as $vid => $vocab) {
      variable_del("page_title_vocab_{$vid}");
      variable_del("page_title_vocab_{$vid}_showfield");
    }
  }
}