Right now we don't provide any description on file formatters that are provided by hook_file_formatter_info. There are quite a few that exist in manage file display and right now you have to turn them on to see how they work since we don't describe them.

Oembed does provide descriptions:

<?php
/**
 * Implements hook_file_formatter_info().
 */
function oembed_file_formatter_info() {
  $formatters['oembed'] = array(
    'label' => t('oEmbed'),
    'default settings' => array('width' => '560', 'height' => '340', 'wmode' => ''),
    'view callback' => 'oembed_file_formatter_view',
    'settings callback' => 'oembed_file_formatter_oembed_settings',
    'description' => t('All-purpose oEmbed formatter.'),
  );
  $formatters['oembed_thumbnail'] = array(
    'label' => t('oEmbed thumbnail'),
    'default settings' => array('width' => '180', 'height' => ''),
    'view callback' => 'oembed_file_formatter_view',
    'settings callback' => 'oembed_file_formatter_oembed_thumbnail_settings',
    'description' => t('oEmbed thumbnail media.'),
  );
  return $formatters;
}
?>

File display formatters

Comments

devin carlson’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

A patch to provide description text for all of the core field (file) formatters.

I also noticed that File entity isn't passing along the description text for file and image field formatters to file entity's file pseudo-field formatters.

devin carlson’s picture

An updated patch to use hook_field_formatter_info_alter() instead of file_entity_file_formatter_info_alter().

willyk’s picture

I reviewed and implemented the above patch #2062355-3: Provide description text for all file formatters and it works as outlined.

dave reid’s picture

Status: Needs review » Fixed

Committed #2 with a couple tweaks to the logic to 7.x-2.x. Thanks everyone! http://drupalcode.org/project/file_entity.git/commit/4ea70a2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.