You are here

function _uc_cart_checkout_next_pane in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart_checkout_pane.inc \_uc_cart_checkout_next_pane()
  2. 7.3 uc_cart/uc_cart_checkout_pane.inc \_uc_cart_checkout_next_pane()

Find the pane that displays below the pane with an ID of $pane_id.

1 call to _uc_cart_checkout_next_pane()
uc_cart_checkout_form in uc_cart/uc_cart.module

File

uc_cart/uc_cart_checkout_pane.inc, line 485
This file contains the callbacks for the default checkout panes supplied with Ubercart and their corresponding helper functions.

Code

function _uc_cart_checkout_next_pane($panes, $pane_id = NULL) {
  if (is_null($pane_id)) {
    return FALSE;
  }
  $next = FALSE;
  foreach ($panes as $target) {
    if ($next) {
      if ($target['collapsible'] && variable_get('uc_pane_' . $target['id'] . '_enabled', TRUE)) {
        return $target['id'];
      }
    }
    if ($target['id'] == $pane_id) {
      $next = TRUE;
    }
  }
  return FALSE;
}