You are here

function mediafield_field_info in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 modules/mediafield/mediafield.module \mediafield_field_info()
  2. 7.3 modules/mediafield/mediafield.module \mediafield_field_info()

Implements hook_field_info().

File

modules/mediafield/mediafield.module, line 11
Provide a "Multimedia asset" field.

Code

function mediafield_field_info() {
  return array(
    'media' => array(
      'label' => t('Multimedia asset'),
      'description' => t('This field stores a reference to a multimedia asset.'),
      'settings' => array(),
      'instance_settings' => array(
        'file_extensions' => variable_get('file_entity_default_allowed_extensions', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm'),
      ),
      'default_widget' => 'media_generic',
      'default_formatter' => 'media',
      'property_type' => 'field_item_file',
      'property_callbacks' => array(
        'entity_metadata_field_file_callback',
      ),
    ),
  );
}