Implements hook_uninstall().
function comment_uninstall() {
// Delete comment_body field.
field_delete_field('comment_body');
// 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);
}
// Remove states.
state()
->delete('comment.node_comment_statistics_scale');
}