array( 'script' => array( 'insert' => array( 'runs when' => t('After script is created'), ), ), ), ); } /** * Implementation of hook_nodeapi(). */ function script_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { switch ($op) { case 'insert': module_invoke_all('script', 'insert', $node); break; } } /** * Implementation of hook_script(). */ function script_script($op, $node) { $aids = _trigger_get_hook_aids('script', $op); $context = array( 'hook' => 'script', 'op' => $op, 'node' => $node, ); actions_do(array_keys($aids), $node, $context); }