uc_get_field_name

Versions
5 – 6
uc_get_field_name($field)

Return the name of an address field.

▾ 21 functions call uc_get_field_name()

theme_address_pane in contributions/ubercart/uc_cart/uc_cart_checkout_pane.inc
theme_uc_shipping_address in contributions/ubercart/shipping/uc_shipping/uc_shipping.module
Compact the address into a table.
uc_cart_checkout_settings_overview in contributions/ubercart/uc_cart/uc_cart.module
uc_cart_pane_quotes in contributions/ubercart/shipping/uc_quote/uc_quote.module
Cart pane callback.
uc_checkout_pane_billing in contributions/ubercart/uc_cart/uc_cart_checkout_pane.inc
Get the billing information.
uc_checkout_pane_delivery in contributions/ubercart/uc_cart/uc_cart_checkout_pane.inc
Get the delivery information.
uc_order_condition_billing_country_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_condition_billing_postal_code_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_condition_billing_zone_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_condition_delivery_country_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_condition_delivery_postal_code_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_condition_delivery_zone_form in contributions/ubercart/uc_order/uc_order_workflow.inc
uc_order_pane_bill_to in contributions/ubercart/uc_order/uc_order_order_pane.inc
Handle the "Bill to" order pane.
uc_order_pane_ship_to in contributions/ubercart/uc_order/uc_order_order_pane.inc
Handle the "Ship to" order pane.
uc_payment_method_check in contributions/ubercart/payment/uc_payment_pack/uc_payment_pack.module
Handle the Check payment method.
uc_paypal_ec_review_form in contributions/ubercart/payment/uc_paypal/uc_paypal.module
uc_quote_admin_settings in contributions/ubercart/shipping/uc_quote/uc_quote.module
Default shipping settings.
uc_quote_form_alter in contributions/ubercart/shipping/uc_quote/uc_quote.module
Implementation of hook_form_alter().
uc_shipping_address_form in contributions/ubercart/shipping/uc_shipping/uc_shipping.module
uc_store_address_fields_form in contributions/ubercart/uc_store/uc_store.module
uc_store_store_settings_form in contributions/ubercart/uc_store/uc_store.module

Code

contributions/ubercart/uc_store/uc_store.module, line 2104

<?php
function uc_get_field_name($field) {
  $fields = array(
    'first_name' => t('First name'),
    'last_name' => t('Last name'),
    'email' => t('E-mail'),
    'phone' => t('Phone number'),
    'company' => t('Company'),
    'address' => t('Address'),
    'street' => t('Street address'),
    'street1' => t('Street address 1'),
    'street2' => t('Street address 2'),
    'city' => t('City'),
    'zone' => t('State/Province'),
    'postal_code' => t('Postal code'),
    'country' => t('Country'),
  );

  $default = $fields[$field];
  if (empty($default)) {
    drupal_set_message(t('The field title %field is being accessed incorrectly.', array('%field' => $field)), 'error');
    return '';
  }

  return variable_get('uc_field_'. $field, $default);
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.