You are here

function clone_menu in Node clone 6

Same name and namespace in other branches
  1. 5.2 clone.module \clone_menu()
  2. 5 clone.module \clone_menu()
  3. 7 clone.module \clone_menu()

Implementation of hook_menu().

File

./clone.module, line 34
Allow users to make a copy of an item of content (a node) and then edit that copy.

Code

function clone_menu() {
  $items['admin/settings/clone'] = array(
    'access arguments' => array(
      'administer site configuration',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clone_settings',
    ),
    'title' => 'Clone module',
    'file' => 'clone.pages.inc',
    'description' => 'Allows users to clone (copy then edit) an existing node.',
  );
  $items['node/%node/clone'] = array(
    'access callback' => 'clone_access_cloning',
    'access arguments' => array(
      1,
    ),
    'page callback' => 'clone_node_check',
    'page arguments' => array(
      1,
    ),
    'title' => 'Clone',
    'weight' => 5,
    'file' => 'clone.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}