You are here

function page_title_uninstall in Page Title 7.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.2 page_title.install \page_title_uninstall()
  5. 6 page_title.install \page_title_uninstall()
  6. 7 page_title.install \page_title_uninstall()

Implements hook_uninstall().

File

./page_title.install, line 96
page_title.install

Code

function page_title_uninstall() {

  // 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_type_get_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_{$vocab->machine_name}");
      variable_del("page_title_vocab_{$vocab->machine_name}_showfield");

      // Legacy delete - just in case the uninstall is happening befoer update 7200
      variable_del("page_title_vocab_{$vid}");
      variable_del("page_title_vocab_{$vid}_showfield");
    }
  }
}