1 node.module node_type_get_name($node)

Returns the node type name of the passed node or node type string.


Node|string $node: A node entity or string that indicates the node type to return.

Return value

string|FALSE: The node type name or FALSE if the node type is not found.


core/modules/node/node.module, line 460
The core module that allows content to be submitted to the site.


function node_type_get_name($node) {
  $type = _node_extract_type($node);
  $types = _node_types_build()->names;
  return isset($types[$type]) ? $types[$type] : FALSE;