You are here

function mediafront_media_field_form in MediaFront 7.2

Returns the media field form.

Parameters

type $default:

Return value

type

1 call to mediafront_media_field_form()
mediafront_field_form in ./mediafront.module
Returns the mediafront field form.

File

./mediafront.module, line 459

Code

function mediafront_media_field_form($default = 'media') {

  // Add our description for the media.
  $description = t('Select how you would like to use this file field for MediaFront.');
  $description .= '<br/>';
  $description .= '<ul>';
  $description .= '<li><strong>' . t('Introduction') . '</strong>: ' . t('This selection will make this file field be used as an introduction, before the commercial') . '</li>';
  $description .= '<li><strong>' . t('Commercial') . '</strong>: ' . t('To use this file field as the commercial for this media type') . '</li>';
  $description .= '<li><strong>' . t('Pre-Reel') . '</strong>: ' . t('The pre-reel is shown right before the main media content, but after the commercial.') . '</li>';
  $description .= '<li><strong>' . t('Media Content') . '</strong>: ' . t('The media content is the main media piece to be played to the user.') . '</li>';
  $description .= '<li><strong>' . t('Post-Reel') . '</strong>: ' . t('The post-reel is shown right after the main media content.') . '</li>';
  $description .= '</ul>';

  // Select the media type for the media.
  return array(
    '#type' => 'select',
    '#title' => t('Media Type'),
    '#description' => $description,
    '#default_value' => $default,
    '#options' => array(
      0 => t('None'),
      'intro' => t('Introduction'),
      'commercial' => t('Commercial'),
      'prereel' => t('Pre-Reel'),
      'media' => t('Media Content'),
      'postreel' => t('Post-Reel'),
    ),
  );
}