You are here

function theme_brightcove_integration in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 theme.inc \theme_brightcove_integration()
1 theme call to theme_brightcove_integration()
brightcove_integrations_page in ./brightcove.admin.inc

File

./theme.inc, line 68
Theme funciton for the module.

Code

function theme_brightcove_integration($variables) {
  $name = check_plain($variables['name']);
  $description = filter_xss($variables['description'], [
    'a',
    'em',
    'strong',
    'cite',
    'blockquote',
    'code',
    'ul',
    'ol',
    'li',
    'dl',
    'dt',
    'dd',
    'br',
  ]);
  $project_link = '';
  if ($variables['project']) {
    $link = "https://drupal.org/project/{$variables['project']}";
    $project_link = l($link, $link);
  }
  $image = '';
  if ($variables['image']) {
    $image = theme('image', [
      'path' => $variables['image'],
    ]);
  }
  return <<<EOS
<div class="brightcove-integration">
  <div class="brightcove-integration-image">{<span class="php-variable">$image</span>}</div>
  <h3 class="brightcove-integration-name">{<span class="php-variable">$name</span>}</h3>
  <p class="brightcove-integration-description">{<span class="php-variable">$description</span>}</p>
  <p class="brightcove-integration-link">{<span class="php-variable">$project_link</span>}</p>
</div>
EOS;
}