function youtube_field_formatter_info in YouTube Field 7
Implements hook_field_formatter_info().
File
- ./
youtube.module, line 251
Code
function youtube_field_formatter_info() {
$formatters = array(
// This formatter displays your youtube video.
'youtube_video' => array(
'label' => t('YouTube video'),
'field types' => array(
'youtube',
),
'settings' => array(
'youtube_size' => '420x315',
'youtube_width' => NULL,
'youtube_height' => NULL,
'youtube_autoplay' => FALSE,
'youtube_mute' => FALSE,
'youtube_loop' => FALSE,
'youtube_controls' => FALSE,
'youtube_autohide' => FALSE,
'youtube_iv_load_policy' => FALSE,
'youtube_playsinline' => FALSE,
'youtube_allow_autoplay' => FALSE,
'youtube_allow_fullscreen' => FALSE,
),
),
// This formatter just displays a thumbnail for your video.
'youtube_thumbnail' => array(
'label' => t('YouTube thumbnail'),
'field types' => array(
'youtube',
),
'settings' => array(
'image_style' => 'thumbnail',
'image_link' => '',
),
),
'youtube_url' => array(
'label' => t('YouTube URL'),
'field types' => array(
'youtube',
),
'settings' => array(
'link' => TRUE,
),
),
);
return $formatters;
}