You are here

function geofield_field_update_field in Geofield 7.2

Implements hook_field_update_field.

If a geofield has been created, check to see if the plugin controlling it defines a 'postinstall' callback, if so, call it.

File

./geofield.module, line 49

Code

function geofield_field_update_field($field, $prior_field, $has_data) {
  if ($field['type'] == 'geofield') {
    $backend = ctools_get_plugins('geofield', 'geofield_backend', $field['settings']['backend']);
    if (!empty($backend['update_field'])) {
      $postinstall_callback = $backend['update_field'];
      $postinstall_callback($field, $prior_field, $has_data);
    }
  }
}