I’m trying to understand the difference between hook_node_type and hook_nodeapi
I’ve tried to use hook_node_type with the story node and a simple dsm but got nothing.
function mymod_node_story($op, $info){
dsm($info);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
hook_node_typeis made to hook into when a node type is changed. Fx if you want to allow comments on node type story etc.hook_nodeapiis used to be able to hook into the different processes that can happen to an actual node, like when a node is saved, when it’s being viewed etc.There’s not a hook for specific nodes, but instead you usually do something like this.