You are here

function node_hook in Drupal 5

Same name and namespace in other branches
  1. 4 modules/node.module \node_hook()
  2. 6 modules/node/node.module \node_hook()
  3. 7 modules/node/node.module \node_hook()

Determine whether a node hook exists.

Parameters

&$node: Either a node object, node array, or a string containing the node type.

$hook: A string containing the name of the hook.

Return value

TRUE iff the $hook exists in the node type of $node.

4 calls to node_hook()
book_node_visitor_html_pre in modules/book/book.module
Generates printer-friendly HTML for a node. This function is a 'pre-node' visitor function for book_recurse().
node_build_content in modules/node/node.module
Builds a structured array representing the node's content.
node_feed in modules/node/node.module
A generic function for generating RSS feeds from a set of nodes.
node_invoke in modules/node/node.module
Invoke a node hook.

File

modules/node/node.module, line 471
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_hook(&$node, $hook) {
  $module = node_get_types('module', $node);
  if ($module == 'node') {
    $module = 'node_content';

    // Avoid function name collisions.
  }
  return module_hook($module, $hook);
}