You are here

function metatag_uninstall in Metatag 7

Implements hook_uninstall().

File

./metatag.install, line 442
Install, update, and uninstall functions for the metatag module.

Code

function metatag_uninstall() {

  // This variable is created via hook_enable.
  variable_del('metatag_schema_installed');

  // Used to control whether 403/404 pages are cached.
  variable_del('metatag_cache_error_pages');

  // Used to make meta tags display on admin pages.
  variable_del('metatag_tag_admin_pages');

  // Temp variables, just in case they weren't removed already.
  variable_del('metatag_skip_update_7017');

  // Used to note that the schema for the main {metatag} table were sufficiently
  // updated.
  variable_del('metatag_has_revision_id');

  // Used to force an entity's default language values to be used if nothing
  // else matched.
  variable_del('metatag_entity_no_lang_default');

  // Controls which page region is used to trigger output of the meta tags.
  variable_del('metatag_page_region');

  // Optionally disable the default configurations.
  variable_del('metatag_load_defaults');

  // Optionally disables the output cache.
  variable_del('metatag_cache_output');

  // Customizable pager string.
  variable_del('metatag_pager_string');

  // Optionally enable translations of final output.
  variable_del('metatag_i18n_translate_output');

  // Optionally enable the automatic watchdog logging of i18n strings.
  variable_del('metatag_i18n_enable_watchdog');

  // Optionally disable the i18n integration.
  variable_del('metatag_i18n_disabled');

  // Optionally output core's meta tags.
  variable_del('metatag_leave_core_tags');

  // Optionally enable individual permissions for each meta tag.
  variable_del('metatag_extended_permissions');

  // Optionally load meta tags on admin pages.
  variable_del('metatag_load_all_pages');

  // Sanitize token replacement output.
  variable_del('metatag_token_sanitize');

  // Remove all possible 'enable' variables.
  foreach (entity_get_info() as $entity_type => $entity_info) {
    variable_del('metatag_enable_' . $entity_type);
    if (!empty($entity_info['bundles'])) {
      foreach ($entity_info['bundles'] as $bundle_name => $bundle_info) {
        variable_del('metatag_enable_' . $entity_type . '__' . $bundle_name);
      }
    }
  }

  // Remove all of the maxlength variables.
  variable_del('metatag_maxlength_title');
  variable_del('metatag_maxlength_description');
  variable_del('metatag_maxlength_abstract');
  variable_del('metatag_maxlength_keywords');
  variable_del('metatag_maxlength_news_keywords');

  // Whether regular text fields can have summary tokens too.
  variable_del('metatag_summary_text_field');

  // Length of summaries generated by the custom tokens.
  variable_del('metatag_summary_length');
}