function _uc_addresses_address_fields_empty in Ubercart Addresses 5
Same name and namespace in other branches
- 5.2 uc_addresses.module \_uc_addresses_address_fields_empty()
- 6 uc_addresses.module \_uc_addresses_address_fields_empty()
1 call to _uc_addresses_address_fields_empty()
- uc_addresses_form_alter in ./
uc_addresses.module - Implementation of hook_form_alter().
File
- ./
uc_addresses.module, line 450
Code
function _uc_addresses_address_fields_empty($fields, $type) {
if (uc_address_field_enabled('first_name') && $fields[$type . '_first_name']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('last_name') && $fields[$type . '_last_name']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('phone') && $fields[$type . '_phone']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('company') && $fields[$type . '_company']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('street1') && $fields[$type . '_street1']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('street2') && $fields[$type . '_street2']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('city') && $fields[$type . '_city']['#default_value']) {
return FALSE;
}
else {
if (uc_address_field_enabled('postal_code') && $fields[$type . '_postal_code']['#default_value']) {
return FALSE;
}
}
}
}
}
}
}
}
return TRUE;
}