You are here

function disqus_field_extra_fields in Disqus 7

Implements hook_field_extra_fields().

File

./disqus.module, line 185
The Disqus Drupal module.

Code

function disqus_field_extra_fields() {
  $extra = array();
  $enabled_types = variable_get('disqus_nodetypes', array());
  foreach (node_type_get_types() as $type) {
    if (!empty($enabled_types[$type->type])) {
      $extra['node'][$type->type] = array(
        'display' => array(
          'disqus' => array(
            'label' => t('Disqus'),
            'description' => t('Disqus comments'),
            'weight' => 1002,
          ),
        ),
      );
    }
  }
  return $extra;
}