Creates a comment_body field instance for a given node type.
$info: An object representing the content type. The only property that is currently used is $info->type, which is the machine name of the content type for which the body field (instance) is to be created.
function _comment_body_field_create($info) {
  // Create the field if needed.
  if (!field_read_field('comment_body', array(
    'include_inactive' => TRUE,
  ))) {
    $field = array(
      'field_name' => 'comment_body',
      'type' => 'text_long',
      'entity_types' => array(
        'comment',
      ),
    );
    field_create_field($field);
  }
  // Create the instance if needed.
  if (!field_read_instance('comment', 'comment_body', 'comment_node_' . $info->type, array(
    'include_inactive' => TRUE,
  ))) {
    entity_invoke_bundle_hook('create', 'comment', 'comment_node_' . $info->type);
    // Attaches the body field by default.
    $instance = array(
      'field_name' => 'comment_body',
      'label' => 'Comment',
      'entity_type' => 'comment',
      'bundle' => 'comment_node_' . $info->type,
      'settings' => array(
        'text_processing' => 1,
      ),
      'required' => TRUE,
    );
    field_create_instance($instance);
    // Assign widget settings for the 'default' form mode.
    entity_get_form_display('comment', 'comment_node_' . $info->type, 'default')
      ->setComponent('comment_body', array(
      'type' => 'text_textarea',
    ))
      ->save();
    // Assign display settings for the 'default' view mode.
    entity_get_display('comment', 'comment_node_' . $info->type, 'default')
      ->setComponent('comment_body', array(
      'label' => 'hidden',
      'type' => 'text_default',
      'weight' => 0,
    ))
      ->save();
  }
}