function commerce_coupon_ui_add_page in Commerce Coupon 7
1 string reference to 'commerce_coupon_ui_add_page'
- commerce_coupon_ui_menu in ./
commerce_coupon_ui.module - Implements hook_menu().
File
- ./
commerce_coupon_ui.module, line 217 - Coupon User Interface for Drupal Commerce
Code
function commerce_coupon_ui_add_page($type = NULL) {
$item = menu_get_item();
$content = system_admin_menu_block($item);
// Bypass the admin/commerce/coupons/add listing if only one product type is
// available.
if (count($content) == 1) {
$item = array_shift($content);
drupal_goto($item['href']);
}
return theme('commerce_coupon_ui_add_list', array(
'content' => $content,
));
}