function field_update_7002

Split the all-inclusive field_bundle_settings variable per bundle.

Related topics

File

modules/field/field.install, line 451

Code

function field_update_7002() {
  $settings = variable_get('field_bundle_settings', array());
  if ($settings) {
    foreach ($settings as $entity_type => $entity_type_settings) {
      foreach ($entity_type_settings as $bundle => $bundle_settings) {
        variable_set('field_bundle_settings_' . $entity_type . '__' . $bundle, $bundle_settings);
      }
    }
    variable_del('field_bundle_settings');
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.