function node_invoke_nodeapi in Drupal 4
Same name and namespace in other branches
- 5 modules/node/node.module \node_invoke_nodeapi()
- 6 modules/node/node.module \node_invoke_nodeapi()
Invoke a hook_nodeapi() operation in all modules.
Parameters
&$node: A node object.
$op: A string containing the name of the nodeapi operation.
$a3, $a4: Arguments to pass on to the hook, after the $node and $op arguments.
Return value
The returned value of the invoked hooks.
12 calls to node_invoke_nodeapi()
- book_node_visitor_html_pre in modules/
book.module - Generates printer-friendly HTML for a node. This function is a 'pre-node' visitor function for book_recurse().
- node_delete in modules/
node.module - Delete a node.
- node_feed in modules/
node.module - A generic function for generating RSS feeds from a set of nodes.
- node_load in modules/
node.module - Load a node object from the database.
- node_object_prepare in modules/
node.module
File
- modules/
node.module, line 327 - The core that allows content to be submitted to the site.
Code
function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
$return = array();
foreach (module_implements('nodeapi') as $name) {
$function = $name . '_nodeapi';
$result = $function($node, $op, $a3, $a4);
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
else {
if (isset($result)) {
$return[] = $result;
}
}
}
return $return;
}