How to invoke hook_node_submit for custom content type

463 views Asked by At

I am trying to run some basic php whenever a node of a specific content type is saved. What's the best way to do this? Is hook_node_submit even the proper function, and if so, how should it be invoked?

This is a CCK content type and not one created through a custom module.

1

There are 1 answers

3
Zolyboy On

Try:

hook_node_presave($node)

This hook is invoked from node_save() before the node is saved to the database.