function oembed_pre_render_retheme in oEmbed 7.0
Same name and namespace in other branches
- 7 oembed.module \oembed_pre_render_retheme()
Rewrite the theme parameter based on the response.
1 string reference to 'oembed_pre_render_retheme'
- oembed_element_info in ./
oembed.module - Implements hook_element_info().
File
- ./
oembed.module, line 455
Code
function oembed_pre_render_retheme($element) {
// Only act when the oEmbed response is true.
if (!empty($element['#printed'])) {
return $element;
}
$embed = $element['#embed'];
$element['#theme'] = 'oembed__' . $embed['type'] . '__' . implode('__', explode(':', $embed['provider'], 2));
return $element;
}