You are here

function faq_uninstall in Frequently Asked Questions 6

Same name and namespace in other branches
  1. 8 faq.install \faq_uninstall()
  2. 5.2 faq.install \faq_uninstall()
  3. 5 faq.install \faq_uninstall()
  4. 7 faq.install \faq_uninstall()

Implementation of hook_uninstall().

Remove the variables, nodes and schema corresponding to the FAQ module.

File

./faq.install, line 55
FAQ module install file.

Code

function faq_uninstall() {

  // Delete the variables we created.
  // General settings.
  variable_del('faq_title');
  variable_del('faq_description');
  variable_del('faq_description_format');

  // Questions page.
  variable_del('faq_display');
  variable_del('faq_question_listing');
  variable_del('faq_qa_mark');
  variable_del('faq_question_label');
  variable_del('faq_answer_label');
  variable_del('faq_question_length');
  variable_del('faq_hide_qa_accordion');
  variable_del('faq_show_expand_all');
  variable_del('faq_use_teaser');
  variable_del('faq_show_node_links');
  variable_del('faq_back_to_top');
  variable_del('faq_disable_node_links');
  variable_del('faq_default_sorting');

  // Categories page.
  variable_del('faq_use_categories');
  variable_del('faq_category_display');
  variable_del('faq_category_listing');
  variable_del('faq_category_hide_qa_accordion');
  variable_del('faq_count');
  variable_del('faq_answer_category_name');
  variable_del('faq_group_questions_top');
  variable_del('faq_hide_child_terms');
  variable_del('faq_show_term_page_children');
  variable_del('faq_omit_vocabulary');
  variable_del('faq_enable_term_links');

  // Block settings.
  variable_del('faq_block_recent_faq_count');
  variable_del('faq_block_random_faq_count');

  // Custom breadcrumbs control
  variable_del('faq_custom_breadcrumbs');

  // Deprecated.
  variable_del('faq_more_link');
  drupal_uninstall_schema('faq');

  // Clear the cache tables.
  cache_clear_all('*', 'cache', TRUE);
  cache_clear_all('*', 'cache_filter', TRUE);
  cache_clear_all('*', 'cache_menu', TRUE);
  cache_clear_all('*', 'cache_page', TRUE);
}