function node_type_get_name

7.x node.module node_type_get_name($node)

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

Parameters

$node: A node object or string that indicates the node type to return.

Return value

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

25 calls to node_type_get_name()
forum_menu_local_tasks_alter in drupal/modules/forum/forum.module
Implements hook_menu_local_tasks_alter().
hook_mail in drupal/modules/system/system.api.php
Prepare a message based on parameters; called from drupal_mail().
hook_search_execute in drupal/modules/search/search.api.php
Execute a search for a set of key words.
NodeTypeTestCase::testNodeTypeGetFunctions in drupal/modules/node/node.test
Ensures that node type functions (node_type_get_*) work correctly.
node_admin_nodes in drupal/modules/node/node.admin.inc
Form builder: Builds the node administration overview.

... See full list

File

drupal/modules/node/node.module, line 459
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

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