You are here

function clone_action_link_title in Node clone 7

Menu title callback.

1 string reference to 'clone_action_link_title'
clone_menu in ./clone.module
Implementation of hook_menu().

File

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

Code

function clone_action_link_title($node) {

  // A hack to present a shorter title in contextual links.
  if (current_path() != 'node/' . $node->nid) {
    return t('Clone');
  }
  if (variable_get('clone_use_node_type_name', 0)) {
    return t('Clone this !type', array(
      '!type' => drupal_strtolower(node_type_get_name($node)),
    ));
  }
  return t('Clone content');
}