function comment_field_extra_fields
comment_field_extra_fields()
Implements hook_field_extra_fields().
File
- modules/comment/comment.module, line 167
- Enables users to comment on published content.
Code
function comment_field_extra_fields() { $return = array(); foreach (node_type_get_types() as $type) { if (variable_get('comment_subject_field_' . $type->type, 1) == 1) { $return['comment']['comment_node_' . $type->type] = array( 'form' => array( 'author' => array( 'label' => t('Author'), 'description' => t('Author textfield'), 'weight' => -2, ), 'subject' => array( 'label' => t('Subject'), 'description' => t('Subject textfield'), 'weight' => -1, ), ), ); } } return $return; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.module/function/comment_field_extra_fields/7.x