I am using the following function to alter the node's data before saving it to the database.
function mymodule_node_presave($node) {
if ($node->type="mytype") {
if ($node->is_new) {
$node->status = 0;
}
}
}
How do I know that the node is new and not updated/edited? In the example, you may see I have used $node->is_new
, and I need to make sure that is correct. So is it?