function oembed_pre_render_fetch in oEmbed 7
Same name and namespace in other branches
- 7.0 oembed.module \oembed_pre_render_fetch()
Pre render fetches the oEmbed data.
1 string reference to 'oembed_pre_render_fetch'
- oembed_element_info in ./
oembed.module - Implements hook_element_info().
File
- ./
oembed.module, line 465 - Core functionality for oEmbed
Code
function oembed_pre_render_fetch($element) {
$embed = oembed_get_data($element['#url'], $element['#parameters']);
// Prevent rendering if the response is bad.
if (!$embed) {
$element['#printed'] = TRUE;
return $element;
}
$element['#embed'] = $embed;
return $element;
}