diff --git a/sites/all/modules/patched/video_embed_field/video_embed_field.field.inc b/sites/all/modules/patched/video_embed_field/video_embed_field.field.inc index 87c3b11..23b4e85 100644 --- a/sites/all/modules/patched/video_embed_field/video_embed_field.field.inc +++ b/sites/all/modules/patched/video_embed_field/video_embed_field.field.inc @@ -33,8 +33,28 @@ function video_embed_field_field_property_callback(&$info, $entity_type, $field, // Set the property. $field_type['property_type'] = $field['type']; - // Then apply the default. - entity_metadata_field_default_property_callback($info, $entity_type, $field, $instance, $field_type); + if (!empty($field_type['property_type'])) { + if ($field['cardinality'] != 1) { + $field_type['property_type'] = 'list<' . $field_type['property_type'] . '>'; + } + // Add in instance specific property info, if given and apply defaults. + $name = $field['field_name']; + $property = &$info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name]; + $instance += array('property info' => array()); + $property = $instance['property info'] + array( + 'label' => $instance['label'], + 'type' => $field_type['property_type'], + 'description' => t('Field "@name".', array('@name' => $name)), + 'getter callback' => 'entity_metadata_field_verbatim_get', + 'setter callback' => 'entity_metadata_field_verbatim_set', + 'access callback' => 'entity_metadata_field_access_callback', + 'query callback' => 'entity_metadata_field_query', + 'translatable' => !empty($field['translatable']), + // Specify that this property stems from a field. + 'field' => TRUE, + 'required' => !empty($instance['required']), + ); + } } }