node_type_load

Versions
7
node_type_load($name)

Menu argument loader; Load a node type by string.

Parameters

$name The machine-readable name of a node type to load; having '_' replaced with '-'.

Return value

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

Code

modules/node/node.module, line 479

<?php
function node_type_load($name) {
  return node_type_get_type(strtr($name, array('-' => '_')));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.