You are here

function theme_oembed in oEmbed 8

Same name and namespace in other branches
  1. 7 theme/oembed.theme.inc \theme_oembed()
  2. 7.0 theme/oembed.theme.inc \theme_oembed()

Theme for oEmbed output.

5 theme calls to theme_oembed()
oEmbed::getInfo in src/Element/oEmbed.php
Returns the element properties for this element.
OembedEndpointTestCase::testOembedEndpoint in modules/oembedprovider/oembedprovider.test
OembedEndpointTestCase::testOembedEndpoint in modules/oembedprovider/oembedprovider.test
OembedProviderTestCase::testOembedProviders in modules/oembedprovider/oembedprovider.test
OembedProviderTestCase::testOembedProviders in modules/oembedprovider/oembedprovider.test

File

theme/oembed.theme.inc, line 11
Theme related functions for oEmbed Core

Code

function theme_oembed($vars) {
  $embed = $vars['embed'];
  $variables = array(
    'path' => $embed['original_url'],
    // oembed_alt_attr() returns output from t() and is sanitized.
    'text' => empty($embed['title']) ? oembed_alt_attr($embed) : check_plain($embed['title']),
    'options' => array(
      'absolute' => TRUE,
      'attributes' => array(
        'class' => 'oembed-link',
      ),
      'html' => TRUE,
    ),
  );
  return theme('link', $variables);
}