You are here

function commerce_payment_ui_menu_local_tasks_alter in Commerce Core 7

Implements hook_menu_local_tasks_alter().

File

modules/payment/commerce_payment_ui.module, line 98
Default Payment UI for Drupal Commerce.

Code

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

  // Add action link 'admin/commerce/config/payment-methods/add' on
  // 'admin/commerce/config/payment-methods'.
  if ($root_path == 'admin/commerce/config/payment-methods') {
    $item = menu_get_item('admin/commerce/config/payment-methods/add');
    if ($item['access']) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
      );
    }
  }
}