Implements hook_entity_bundle_info().
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;
}