1 comment.module comment_field_extra_fields()

Implements hook_field_extra_fields().

File

core/modules/comment/comment.module, line 150
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_title_options'] == COMMENT_TITLE_CUSTOM) {
      $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;
}