function node_type_load in Drupal 7
Same name and namespace in other branches
- 8 core/modules/node/node.module \node_type_load()
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 modules/
node/ content_types.inc - Form constructor for the node type editing form.
File
- 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(
'-' => '_',
)));
}