You are here

function commons_origins_preprocess_media_oembed in Drupal Commons 7.3

Implements hook_preprocess_media_oembed().

File

themes/commons/commons_origins/template.php, line 55
Process theme data.

Code

function commons_origins_preprocess_media_oembed(&$variables) {
  $content = $variables['content'];
  $type = $variables['type'];

  // Video and rich type must have HTML content.
  // Wrap the HTML content in a <div> to allow it to be made responsive.
  if (in_array($type, array(
    'video',
    'rich',
  ))) {
    $variables['content'] = '<div class="oembed">' . $content . '</div>';
  }
}