You are here

function clone_menu in Node clone 7

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

Implementation of hook_menu().

File

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

Code

function clone_menu() {
  $items['admin/config/content/clone'] = array(
    'access arguments' => array(
      'administer site configuration',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clone_settings',
    ),
    'title' => 'Node clone module',
    'file' => 'clone.pages.inc',
    'description' => 'Allows users to clone (copy then edit) an existing node.',
  );
  $items['node/%node/clone/%clone_token'] = array(
    'access callback' => 'clone_access_cloning',
    'access arguments' => array(
      1,
      TRUE,
      3,
    ),
    'page callback' => 'clone_node_check',
    'page arguments' => array(
      1,
    ),
    'title' => 'Clone content',
    'title callback' => 'clone_action_link_title',
    'title arguments' => array(
      1,
    ),
    'weight' => 5,
    'file' => 'clone.pages.inc',
    'type' => MENU_LOCAL_ACTION,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  return $items;
}