Skip to main content
1 of 2
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Looking at the code of node_save(), which the function used to save a node, the hooks that are invoked after drupal_write_record(), which is the function used to set the node ID, are the following ones (when the node is created):

// Call the node specific callback (if any). This can be
// node_invoke($node, 'insert') or
// node_invoke($node, 'update').
node_invoke($node, $op);

// Save fields.
$function = "field_attach_$op";
$function('node', $node);

module_invoke_all('node_' . $op, $node);
module_invoke_all('entity_' . $op, $node, 'node');
avpaderno
  • 97.9k
  • 15
  • 164
  • 284