function theme_oembed in oEmbed 7.0
Same name and namespace in other branches
- 8 theme/oembed.theme.inc \theme_oembed()
- 7 theme/oembed.theme.inc \theme_oembed()
Theme for oEmbed output.
5 theme calls to theme_oembed()
- OembedEndpointTestCase::testOembedEndpoint in oembedprovider/
oembedprovider.test - OembedEndpointTestCase::testOembedEndpoint in oembedprovider/
oembedprovider.test - OembedProviderTestCase::testOembedProviders in oembedprovider/
oembedprovider.test - OembedProviderTestCase::testOembedProviders in oembedprovider/
oembedprovider.test - oembed_element_info in ./
oembed.module - Implements hook_element_info().
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);
}