Altering the type of a menu item to local task (tab) I've searched for hours but I can't find a good answer on how to alter the type of a menu item to local task (tab).

The private messages 7.x module (when aided by privatemsg_filter) exposes the following tabs (local tasks):


Inbox (/messages)
Sent Messages (/messages/sent)
All Messages (/messages/list)


There is a 4th menu item (/messages/new) which is currently a MENU_LOCAL_ITEM and I want to make it a local task as well. But how? And what is the best way?
The following hack worked, to create a new local task item with definitions identical to the original menu item except it's a local task. But is it the optimal way?

&lt;?
/**
 * Implements hook_menu().
 */
function MOMODULE_menu() {
  $items['messages/newmessage'] = array(
    'title'            =&gt; 'Write new message',
    'page callback'    =&gt; 'drupal_get_form',
    'page arguments'   =&gt; array('privatemsg_new', 2, 3, NULL),
    // 'file'             =&gt; 'privatemsg.pages.inc',
    'access callback'  =&gt; 'privatemsg_user_access',
    'access arguments' =&gt; array('write privatemsg'),
    'type'             =&gt; MENU_LOCAL_TASK,
    'weight'           =&gt; 5,
    'menu_name'        =&gt; 'user-menu',
  );

  return $items;
}