You are here

function clone_action_node_clone in Node clone 7

Action callback for cloning a node.

Parameters

$node: The node to clone.

File

./clone.rules.inc, line 55
Node clone rules functions

Code

function clone_action_node_clone($node) {
  include_once drupal_get_path('module', 'clone') . '/clone.pages.inc';
  $new_nid = clone_node_save($node->nid);
  $new_node = entity_load_single('node', $new_nid);
  return array(
    'clone' => $new_node,
  );
}