function comment_uninstall

Same name in other branches
  1. 9 core/modules/comment/comment.install \comment_uninstall()
  2. 8.9.x core/modules/comment/comment.install \comment_uninstall()
  3. 10 core/modules/comment/comment.install \comment_uninstall()
  4. 11.x core/modules/comment/comment.install \comment_uninstall()

Implements hook_uninstall().

File

modules/comment/comment.install, line 11

Code

function comment_uninstall() {
    // Remove variables.
    variable_del('comment_block_count');
    $node_types = array_keys(node_type_get_types());
    foreach ($node_types as $node_type) {
        field_attach_delete_bundle('comment', 'comment_node_' . $node_type);
        variable_del('comment_' . $node_type);
        variable_del('comment_anonymous_' . $node_type);
        variable_del('comment_controls_' . $node_type);
        variable_del('comment_default_mode_' . $node_type);
        variable_del('comment_default_order_' . $node_type);
        variable_del('comment_default_per_page_' . $node_type);
        variable_del('comment_form_location_' . $node_type);
        variable_del('comment_preview_' . $node_type);
        variable_del('comment_subject_field_' . $node_type);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.