Create node display custom tab I'm trying to create tab in node display that links to node delete form. I used hook_menu_local_tasks_alter in template.php

function mytheme_menu_local_tasks_alter(&amp;$data, $router_item, $root_path) {
// Add a tab linking to node/add to all pages.
$data ['tabs'][0]['output'][] = array(
'#theme' =&gt; 'menu_local_task',
'#link' =&gt; array(
    'title' =&gt; t('Delete'),
    'tab_parent' =&gt; 'node/%',
    'tab_root' =&gt; 'node/%',
    'tab_root_href' =&gt; 'node/'.arg(1),
    'tab_parent_href' =&gt; 'node/'.arg(1),
    'href' =&gt; 'node/'.arg(1).'/delete',
    'access callback' =&gt; 'node_access',
    'access arguments' =&gt; array('delete', 1),
    'localized_options' =&gt; array(
    'attributes' =&gt; array(
     'title' =&gt; t('Delete'),
    ),
  ),
),

);

}


Tab is created but it is displayed for every user and on every page where tabs are enabled. How can I configure access arguments to display tab only on node display page and only for user with permissions [Content type]: delete own content?
This will be done by hook_menu, See the example below for creating tabs (MENU_LOCAL_TASK). This is how tabs will be created.

    // For the default local task, we need very little configuration, as the
  // callback and other conditions are handled by the parent callback.
  $items['examples/menu_example/tabs/default'] = array(
    'type' =&gt; MENU_DEFAULT_LOCAL_TASK,
    'title' =&gt; 'Default primary tab',
    'weight' =&gt; 1,
  );
  // Now add the rest of the tab entries.
  foreach (array(
    t('second') =&gt; 2,
    t('third') =&gt; 3,
    t('fourth') =&gt; 4,
  ) as $tabname =&gt; $weight) {
    $items["examples/menu_example/tabs/$tabname"] = array(
      'type' =&gt; MENU_LOCAL_TASK,
      'title' =&gt; $tabname,
      'page callback' =&gt; '_menu_example_menu_page',
      'page arguments' =&gt; array(t('This is the tab "@tabname" in the "basic tabs" example', array('@tabname' =&gt; $tabname))),
      'access callback' =&gt; TRUE,

      // The weight property overrides the default alphabetic ordering of menu
      // entries, allowing us to get our tabs in the order we want.
      'weight' =&gt; $weight,
    );