function hook_clone_node_alter in Node clone 6
Same name and namespace in other branches
- 8 node_clone.api.php \hook_clone_node_alter()
- 7 clone.api.php \hook_clone_node_alter()
Alter the node before saving a clone.
Parameters
$node: Reference to the fully loaded node object being saved (the clone) that can be altered as needed.
$original_node: A copy of the fully loaded node object being cloned (the original).
$method: The cloning method which can be either 'prepopulate' or 'save-edit'.
See also
2 invocations of hook_clone_node_alter()
- clone_node_prepopulate in ./
clone.pages.inc - Clones a node - prepopulate a node editing form
- clone_node_save in ./
clone.pages.inc - Clones a node by directly saving it.
File
- ./
clone.api.php, line 22 - API documentation for the Node clone module.
Code
function hook_clone_node_alter(&$node, $original_node, $method) {
if ($original_node->type = 'special') {
$node->special = special_something();
}
}