You are here

function auto_entitylabel_uninstall in Automatic Entity Label 7

Same name and namespace in other branches
  1. 8.3 auto_entitylabel.install \auto_entitylabel_uninstall()
  2. 8.2 auto_entitylabel.install \auto_entitylabel_uninstall()

Implements hook_uninstall().

File

./auto_entitylabel.install, line 54
Installation file for the automatic entity labels module.

Code

function auto_entitylabel_uninstall() {
  static $variables = array(
    'auto_entitylabel',
    'auto_entitylabel_pattern',
    'auto_entitylabel_php',
  );
  foreach (entity_get_info() as $entity_type => $entity_info) {
    foreach ($entity_info['bundles'] as $bundle_name => $bundle_info) {
      foreach ($variables as $variable) {
        variable_del($variable . '_' . $entity_type . '_' . $bundle_name);
      }
    }
  }
}