function uc_shipping_menu_local_tasks_alter in Ubercart 7.3
Implements hook_menu_local_tasks_alter().
File
- shipping/
uc_shipping/ uc_shipping.module, line 174 - Organizes ordered products into packages and sets them up for shipment. Shipping method modules may add functionality to generate shipping labels and tracking numbers.
Code
function uc_shipping_menu_local_tasks_alter(&$data, $router_item, $root_path) {
if ($root_path == 'admin/store/orders/%/shipments') {
$order = $router_item['page_arguments'][0];
$item = menu_get_item('admin/store/orders/' . $order->order_id . '/packages/new');
if ($item['access']) {
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
}
}