function node_type_load

7.x node.module node_type_load($name)

Menu argument loader: loads a node type by string.

Parameters

$name: The machine-readable name of a node type to load, where '_' is replaced with '-'.

Return value

A node type object or FALSE if $name does not exist.

1 string reference to 'node_type_load'
node_type_form in drupal/modules/node/content_types.inc
Form constructor for the node type editing form.

File

drupal/modules/node/node.module, line 489
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_load($name) {
  return node_type_get_type(strtr($name, array('-' => '_')));
}