You are here

function maxlength_uninstall in Maxlength 6.2

Same name and namespace in other branches
  1. 5.2 maxlength.install \maxlength_uninstall()
  2. 5 maxlength.install \maxlength_uninstall()
  3. 6 maxlength.install \maxlength_uninstall()
  4. 7.3 maxlength.install \maxlength_uninstall()
  5. 7 maxlength.install \maxlength_uninstall()
  6. 7.2 maxlength.install \maxlength_uninstall()

Implementation of hook_unistall().

@todo clean up CCK field variables as well

File

./maxlength.install, line 74
Install file for the maxlenght module

Code

function maxlength_uninstall() {
  foreach (node_get_types() as $type => $name) {
    $labels = array(
      'title',
      'js_title',
      'text_title',
      'body',
      'js_body',
      'text_body',
    );
    foreach ($labels as $label) {
      variable_del('maxlength_' . $label . '_' . $type);
    }
  }

  // Remove CCK fields variables
  if (module_exists('content')) {
    foreach (content_fields() as $field_name => $field_info) {
      maxlength_remove_field_variables($field_name);
    }
  }
}