node_hook
modules/node/node.module, строка 625
- Версии
- 5 – 6
node_hook(&$node, $hook)
Determine whether a node hook exists.
Параметры
&$node
Either a node object, node array, or a string containing the node type.
$hook
A string containing the name of the hook.
Возвращаемое значение
TRUE
iff the $hook
exists in the node type of $node
.
Код
<?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);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии