Skip to content

Instantly share code, notes, and snippets.

@andypost
Last active December 12, 2015 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andypost/4710742 to your computer and use it in GitHub Desktop.
Save andypost/4710742 to your computer and use it in GitHub Desktop.
/**
* Implements hook_field_info().
*/
function comment_field_info() {
return array(
'comment' => array(
'label' => t('Comments'),
'description' => t('This field manages configuration and presentation of comments on an entity'),
'settings' => array(
'comment' => COMMENT_OPEN,
),
'instance_settings' => array(
'comment' => array(
// Comment form settings per field bundle.
'comment_anonymous' => COMMENT_ANONYMOUS_MAYNOT_CONTACT,
'comment_subject_field' => 1,
'comment_preview' => DRUPAL_OPTIONAL
)
),
'default_widget' => 'comment_default',
'default_formatter' => 'comment_default'
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment