function node_invoke_nodeapi in Drupal 5
Same name and namespace in other branches
- 4 modules/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.
15 calls to node_invoke_nodeapi()
- blogapi_blogger_edit_post in modules/
blogapi/ blogapi.module - Blogging API callback. Modifies the specified blog node.
- blogapi_blogger_new_post in modules/
blogapi/ blogapi.module - Blogging API callback. Inserts a new blog post as a node.
- book_node_visitor_html_pre in modules/
book/ book.module - Generates printer-friendly HTML for a node. This function is a 'pre-node' visitor function for book_recurse().
- node_build_content in modules/
node/ node.module - Builds a structured array representing the node's content.
- node_delete in modules/
node/ node.module - Delete a node.
File
- modules/
node/ node.module, line 514 - 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_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;
}