function node_clone_action_node_clone in Node clone 8
Action callback for cloning a node.
Parameters
$node: The node to clone.
File
- ./
node_clone.rules.inc, line 55 - Node clone rules functions
Code
function node_clone_action_node_clone($node) {
include_once drupal_get_path('module', 'node_clone') . '/node_clone.pages.inc';
$new_nid = node_clone_node_save($node->nid);
$new_node = entity_load_single('node', $new_nid);
return array(
'clone' => $new_node,
);
}