You are here

function uc_order_init in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \uc_order_init()

Implements hook_init().

File

uc_order/uc_order.module, line 350

Code

function uc_order_init() {

  // Load uc_order.js on all order and customer admin pages.
  if (arg(0) == 'admin' && arg(1) == 'store' && (arg(2) == 'orders' || arg(2) == 'customers')) {
    drupal_add_js(array(
      'ucURL' => array(
        'adminOrders' => url('admin/store/orders/'),
      ),
    ), 'setting');
    drupal_add_js(drupal_get_path('module', 'uc_order') . '/uc_order.js');
  }
}