node_hook

modules/node/node.module, line 625

Versions
4.6 – 6
node_hook(&$node, $hook)
7
node_hook($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.

▾ 6 functions call node_hook()

hook_update_index in developer/hooks/core.php
Update Drupal's full-text index for this module.
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.
node_overview_types in modules/node/content_types.inc
Displays the content type admin overview page.
_node_add_access in modules/node/node.module

Code

<?php
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);
}
?>
 
 

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.