You are here

function rooms_unit_menu_local_tasks_alter in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Implements hook_menu_local_tasks_alter().

File

modules/rooms_unit/rooms_unit.module, line 611
Manage units - Units are things that can be booked on a nightly basis (e.g. rooms - but also villas bungalows, etc).

Code

function rooms_unit_menu_local_tasks_alter(&$data, $router_item, $root_path) {

  // Create an action link on the Rooms Units admin page for adding new units.
  if ($root_path == 'admin/rooms/units') {
    $item = menu_get_item('admin/rooms/units/add');
    if ($item['access']) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
      );
    }
  }
}