You are here

function node_invoke_nodeapi in Drupal 6

Same name and namespace in other branches
  1. 4 modules/node.module \node_invoke_nodeapi()
  2. 5 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.

14 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.
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.
node_feed in modules/node/node.module
A generic function for generating RSS feeds from a set of nodes.

... See full list

File

modules/node/node.module, line 681
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;
}