node_type_load

7 node.module node_type_load($name)
8 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'

File

modules/node/node.module, line 478
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('-' => '_')));
}
Login or register to post comments