You are here

function mediafront_field_info in MediaFront 7

Same name and namespace in other branches
  1. 6.2 mediafront.module \mediafront_field_info()
  2. 6 mediafront.module \mediafront_field_info()

Implements hook_field_info().

File

includes/mediafront.field.inc, line 5

Code

function mediafront_field_info() {
  $presets = mediafront_preset_get_presets();
  $preset = array_shift($presets);
  $default_formatter = $preset ? 'mediaplayer__' . $preset['name'] : 'hidden';
  return array(
    'mediaplayer' => array(
      'label' => t('Media Player'),
      'description' => t('Add a media player to this entity.'),
      'default_widget' => 'mediaplayer',
      'default_formatter' => $default_formatter,
      'instance_settings' => array(
        'show_player' => true,
      ),
    ),
  );
}