diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-23 18:23:24 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-23 18:23:24 +0000 |
commit | ecf913b37f71b55ba19c0cf3a65861b6f3879d60 (patch) | |
tree | 34bcf5e0ecbdba9c35994776de00a260c25beebd /modules/field/field.form.inc | |
parent | 1d2e7683abf643bb04856d5a58e8d2bb7dc4e860 (diff) | |
download | brdo-ecf913b37f71b55ba19c0cf3a65861b6f3879d60.tar.gz brdo-ecf913b37f71b55ba19c0cf3a65861b6f3879d60.tar.bz2 |
#806830 by Amitaibu, yched: Add Dynamic (i.e. not cached) alter hook to instance definitions.
Diffstat (limited to 'modules/field/field.form.inc')
-rw-r--r-- | modules/field/field.form.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc index d5778dfc5..474cc7f5b 100644 --- a/modules/field/field.form.inc +++ b/modules/field/field.form.inc @@ -25,6 +25,15 @@ function field_default_form($entity_type, $entity, $field, $instance, $langcode, $items = field_get_default_value($entity_type, $entity, $field, $instance, $langcode); } + // Let modules alter the widget properties. + $context = array( + 'entity_type' => $entity_type, + 'entity' => $entity, + 'field' => $field, + 'instance' => $instance, + ); + drupal_alter(array('field_widget_properties', 'field_widget_properties_' . $entity_type), $instance['widget'], $context); + // Collect widget elements. $elements = array(); if (field_access('edit', $field, $entity_type, $entity)) { |