1 comment.module | comment_menu_node_type_load($name) |
Loads the comment bundle name corresponding a given content type.
This function is used as a menu loader callback in comment_menu().
Parameters
$name: The URL-formatted machine name of the node type whose comment fields are to be edited. 'URL-formatted' means that underscores are replaced by hyphens.
Return value
The comment bundle name corresponding to the node type.:
See also
File
- core/
modules/ comment/ comment.module, line 306 - Enables users to comment on published content.
Code
function comment_menu_node_type_load($name) {
if ($type = node_type_get_type(strtr($name, array('-' => '_')))) {
return 'comment_node_' . $type->type;
}
}