function node_hook

Determines whether a node hook exists.

Parameters

$node: A node object or a string containing the node type.

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

Return value

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

5 calls to node_hook()
NodeController::attachLoad in drupal/modules/node/node.module
Attaches data to entities upon loading.
node_build_content in drupal/modules/node/node.module
Builds a structured array representing the node's content.
node_invoke in drupal/modules/node/node.module
Invokes a node hook.
node_overview_types in drupal/modules/node/content_types.inc
Displays the content type admin overview page.
_node_add_access in drupal/modules/node/node.module
Access callback: Checks whether the user has permission to add a node.

File

drupal/modules/node/node.module, line 894
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) {
  $base = node_type_get_base($node);
  return module_hook($base, $hook);
}