1 comment.module _comment_menu_admin_access($entity_type_name)

Menu access callback; determines if menu entries should be shown.

Parameters

string $entity_type_name: The machine name of the entity type on which fields are being applied. This is the value after comment_menu_node_type_load() has been called. For example, "comment_node_post" for the "post" node type.

Return value

bool: TRUE if menu items should be accessible, FALSE if hidden or not allowed.

File

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

Code

function _comment_menu_admin_access($entity_type_name) {
  $node_type_name = str_replace('comment_node_', '', $entity_type_name);
  $node_type = node_type_get_type($node_type_name);
  return $node_type && $node_type->settings['comment_enabled'] && user_access('administer fields');
}