You are here

function video_embed_field_default_video_embed_styles in Video Embed Field 7.2

Implements hook_default_video_styles().

File

./video_embed_field.module, line 52
Provides a simple field for easily embedding videos from youtube or vimeo

Code

function video_embed_field_default_video_embed_styles() {
  $styles = array();
  $handlers = video_embed_get_handlers();

  // Create the normal handler.
  $normal = new stdClass();
  $normal->disabled = FALSE;

  /* Edit this to true to make a default video_embed_style disabled initially */
  $normal->api_version = 1;
  $normal->name = 'normal';
  $normal->title = 'Normal';
  $normal->data = array();
  $teaser = new stdClass();
  $teaser->disabled = FALSE;

  /* Edit this to true to make a default video_embed_style disabled initially */
  $teaser->api_version = 1;
  $teaser->name = 'teaser';
  $teaser->title = 'Teaser';
  $teaser->data = array();

  // Add in our settings for each of the handlers.
  foreach ($handlers as $name => $handler) {
    $normal->data[$name] = $handler['defaults'];
    $teaser->data[$name] = $handler['defaults'];
    $teaser->data[$name]['width'] = 480;
    $teaser->data[$name]['height'] = 270;
  }
  return array(
    $normal,
    $teaser,
  );
}