You are here

function addressfield_phone_addressfield_types in Address Field Phone 7

Returns an array of the field names of any addressfields.

2 calls to addressfield_phone_addressfield_types()
addressfield_phone_field_attach_load in ./addressfield_phone.module
Implements hook_field_attach_load().
addressfield_phone_field_attach_presave in ./addressfield_phone.module
Implements hook_field_attach_presave().

File

./addressfield_phone.module, line 149
Add additional phone fields to addressfield.

Code

function addressfield_phone_addressfield_types() {
  if (!isset($addressfields)) {
    static $addressfields;
    $result = db_query("SELECT field_name FROM {field_config} WHERE type = 'addressfield'");
    $addressfields = array();
    foreach ($result as $row) {
      $addressfields[] = $row->field_name;
    }
  }
  return $addressfields;
}