1 comment.module comment_field_extra_fields()

Implements hook_field_extra_fields().

File

core/modules/comment/comment.module, line 124
Enables users to comment on published content.

Code

function comment_field_extra_fields() {
  $return = array();

  foreach (node_type_get_types() as $type) {
    if ($type->settings['comment_subject_field']) {
      $return['comment']['comment_node_' . $type->type] = array(
        'form' => array(
          'author' => array(
            'label' => t('Author'),
            'description' => t('Author textfield'),
            'weight' => -2,
          ),
          'subject' => array(
            'label' => t('Title'),
            'description' => t('Title textfield'),
            'weight' => -1,
          ),
        ),
      );
    }
  }

  return $return;
}