function node_invoke_nodeapi

6.x node.module node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL)

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.

16 calls to node_invoke_nodeapi()
blogapi_blogger_edit_post in drupal-6.x/modules/blogapi/blogapi.module
Blogging API callback. Modifies the specified blog node.
blogapi_blogger_new_post in drupal-6.x/modules/blogapi/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
hook_search in documentation-6.x/developer/hooks/core.php
Define a custom search routine.
hook_update_index in documentation-6.x/developer/hooks/core.php
Update Drupal's full-text index for this module.
node_build_content in drupal-6.x/modules/node/node.module
Builds a structured array representing the node's content.

... See full list

File

drupal-6.x/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;
}