function node_type_get_label

Returns the node type label for the passed node type name.

Parameters

string $name: The machine name of a node type.

Return value

string|false The node type label or FALSE if the node type is not found.

7 calls to node_type_get_label()
forum_menu_local_tasks_alter in drupal/core/modules/forum/forum.module
Implements hook_menu_local_tasks_alter().
NodeTypeTest::testNodeTypeGetFunctions in drupal/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php
Ensures that node type functions (node_type_get_*) work correctly.
node_help in drupal/core/modules/node/node.module
Implements hook_help().
PollTestBase::pollCreate in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php
Creates a poll.
PollTestBase::pollUpdate in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php
Tests updating a poll.

... See full list

File

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

Code

function node_type_get_label($name) {
  $types = _node_types_build()->names;
  return isset($types[$name]) ? $types[$name] : FALSE;
}