function node_hook

node_hook($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.

File

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.module/function/node_hook/7.x