function comment_entity_bundle_info

Implements hook_entity_bundle_info().

File

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

Code

function comment_entity_bundle_info() {
  $bundles = array();
  foreach (node_type_get_names() as $type => $name) {
    $bundles['comment']['comment_node_' . $type] = array(
      'label' => t('@node_type comment', array(
        '@node_type' => $name,
      )),
      // Provide the node type/bundle name for other modules, so it does not
      // have to be extracted manually from the bundle name.
      'node bundle' => $type,
    );
  }
  return $bundles;
}