You are here

function sharerich_uninstall in Sharerich 7.3

Same name and namespace in other branches
  1. 8 sharerich.install \sharerich_uninstall()
  2. 7 sharerich.install \sharerich_uninstall()
  3. 7.2 sharerich.install \sharerich_uninstall()

Implements hook_uninstall().

File

./sharerich.install, line 149
Install hooks for Sharerich project.

Code

function sharerich_uninstall() {
  drupal_uninstall_schema('sharerich');

  // Clean entity configurations.
  foreach (node_type_get_types() as $node) {
    variable_del('sharerich_node_' . $node->type);
  }
  module_load_include('module', 'sharerich', 'sharerich');
  foreach (sharerich_get_services() as $service_name) {
    $var_name = 'sharerich_custom_' . $service_name;
    variable_del($var_name);
  }

  // Clean all the rest.
  variable_del('sharerich_youtube_username');
  variable_del('sharerich_github_username');
  variable_del('sharerich_facebook_app_id');
  variable_del('sharerich_facebook_site_url');
  variable_del('sharerich_add_js');
  variable_del('sharerich_add_css');
  variable_del('sharerich_block_hashes');
  variable_del('sharerich_services');
  variable_del('sharerich_title');
  variable_del('sharerich_library_variant');
  variable_del('sharerich_skip_js');
}